5
__copyright__ = 'this file is in the public domain'
7
from gozerbot.bot import Bot
8
from gozerbot.generic import stringinlist, waitforqueue
9
from gozerbot.plugins import plugins
10
import unittest, Queue
12
plugins.reload('gozerplugs.plugs', 'choice')
14
class test_choice(unittest.TestCase):
16
b.userhosts['test'] = 'test@test'
18
def test_choice(self):
19
result = self.b.test('choice')
20
self.assert_(stringinlist('space seperated list', result))
22
def test_choice2(self):
23
result = self.b.test('choice a b')
24
self.assert_('a' in result[0] or 'b' in result[0])
26
def test_choice3(self):
31
result = self.b.test('choice', kw = {'inqueue': q })
32
self.assert_('a' in result[0] or 'b' in result[0])