mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 03:33:11 +01:00
Aka: update tests
This commit is contained in:
parent
f802f77904
commit
f05f04807d
@ -112,10 +112,10 @@ class AkaChannelTestCase(ChannelPluginTestCase):
|
||||
cb._add_aka('global', 'foobar', 'echo sbbone')
|
||||
cb._db.lock_aka('global', 'foobar', 'evil_admin')
|
||||
self.assertResponse('foobar', 'sbbone')
|
||||
self.assertRegexp('list Aka', 'foobar')
|
||||
self.assertRegexp('aka list', 'foobar')
|
||||
self.assertRaises(Aka.AkaError, cb._remove_aka, 'global', 'foobar')
|
||||
cb._remove_aka('global', 'foobar', evenIfLocked=True)
|
||||
self.assertNotRegexp('list Aka', 'foobar')
|
||||
self.assertNotRegexp('aka list', 'foobar')
|
||||
self.assertError('foobar')
|
||||
|
||||
def testOptionalArgs(self):
|
||||
@ -226,5 +226,10 @@ class AkaTestCase(PluginTestCase):
|
||||
self.assertRegexp('alias spam', 'there is no command named')
|
||||
self.assertResponse('aka spam', 'egg')
|
||||
|
||||
def testList(self):
|
||||
self.assertNotError('aka add foo bar')
|
||||
self.assertRegexp('aka list', 'foo.*?bar \$\*')
|
||||
self.assertNotError('aka add "foo bar" baz')
|
||||
self.assertRegexp('aka list', 'foo.*?bar \$\*.*?foo bar.*?baz \$\*')
|
||||
|
||||
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
|
||||
|
Loading…
Reference in New Issue
Block a user