mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Misc: Add tests for “list --unloaded” and command flood.
This commit is contained in:
parent
74a36c8cfc
commit
b026cfd197
@ -98,6 +98,7 @@ class MiscTestCase(ChannelPluginTestCase):
|
|||||||
def testList(self):
|
def testList(self):
|
||||||
self.assertNotError('list')
|
self.assertNotError('list')
|
||||||
self.assertNotError('list Misc')
|
self.assertNotError('list Misc')
|
||||||
|
self.assertRegexp('list --unloaded', 'Ctcp')
|
||||||
|
|
||||||
def testListIsCaseInsensitive(self):
|
def testListIsCaseInsensitive(self):
|
||||||
self.assertNotError('list misc')
|
self.assertNotError('list misc')
|
||||||
@ -227,6 +228,13 @@ class MiscTestCase(ChannelPluginTestCase):
|
|||||||
def testInvalidCommand(self):
|
def testInvalidCommand(self):
|
||||||
self.assertError('echo []')
|
self.assertError('echo []')
|
||||||
|
|
||||||
|
def testInvalidCommands(self):
|
||||||
|
with conf.supybot.abuse.flood.command.invalid.maximum.context(3):
|
||||||
|
self.assertNotRegexp('foo', 'given me', frm='f!f@__no_testcap__')
|
||||||
|
self.assertNotRegexp('bar', 'given me', frm='f!f@__no_testcap__')
|
||||||
|
self.assertNotRegexp('baz', 'given me', frm='f!f@__no_testcap__')
|
||||||
|
self.assertRegexp('qux', 'given me', frm='f!f@__no_testcap__')
|
||||||
|
|
||||||
def testMoreIsCaseInsensitive(self):
|
def testMoreIsCaseInsensitive(self):
|
||||||
self.assertNotError('echo %s' % ('abc'*2000))
|
self.assertNotError('echo %s' % ('abc'*2000))
|
||||||
self.assertNotError('more')
|
self.assertNotError('more')
|
||||||
|
Loading…
Reference in New Issue
Block a user