mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
User: Add tests for @user list --capability.
This commit is contained in:
parent
929090c279
commit
88b2b235ff
@ -33,7 +33,7 @@ import supybot.world as world
|
|||||||
import supybot.ircdb as ircdb
|
import supybot.ircdb as ircdb
|
||||||
|
|
||||||
class UserTestCase(PluginTestCase):
|
class UserTestCase(PluginTestCase):
|
||||||
plugins = ('User',)
|
plugins = ('User', 'Admin')
|
||||||
prefix1 = 'somethingElse!user@host.tld'
|
prefix1 = 'somethingElse!user@host.tld'
|
||||||
prefix2 = 'EvensomethingElse!user@host.tld'
|
prefix2 = 'EvensomethingElse!user@host.tld'
|
||||||
def testHostmaskList(self):
|
def testHostmaskList(self):
|
||||||
@ -91,6 +91,13 @@ class UserTestCase(PluginTestCase):
|
|||||||
self.prefix = self.prefix2
|
self.prefix = self.prefix2
|
||||||
self.assertNotError('register biff quux')
|
self.assertNotError('register biff quux')
|
||||||
self.assertResponse('user list', 'biff and foo')
|
self.assertResponse('user list', 'biff and foo')
|
||||||
|
|
||||||
|
self.assertRegexp('user list --capability testcap', 'no matching')
|
||||||
|
self.assertNotError('admin capability add biff testcap')
|
||||||
|
self.assertResponse('user list --capability testcap', 'biff')
|
||||||
|
self.assertNotError('admin capability remove biff testcap')
|
||||||
|
self.assertRegexp('user list --capability testcap', 'no matching')
|
||||||
|
|
||||||
self.assertResponse('user list f', 'biff and foo')
|
self.assertResponse('user list f', 'biff and foo')
|
||||||
self.assertResponse('user list f*', 'foo')
|
self.assertResponse('user list f*', 'foo')
|
||||||
self.assertResponse('user list *f', 'biff')
|
self.assertResponse('user list *f', 'biff')
|
||||||
|
Loading…
Reference in New Issue
Block a user