From 88b2b235ff4adb05f47ab407f224ee54caa9c37d Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Mon, 29 Oct 2012 19:28:59 +0100 Subject: [PATCH] User: Add tests for @user list --capability. --- plugins/User/test.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/User/test.py b/plugins/User/test.py index a9526987a..6b72902f0 100644 --- a/plugins/User/test.py +++ b/plugins/User/test.py @@ -33,7 +33,7 @@ import supybot.world as world import supybot.ircdb as ircdb class UserTestCase(PluginTestCase): - plugins = ('User',) + plugins = ('User', 'Admin') prefix1 = 'somethingElse!user@host.tld' prefix2 = 'EvensomethingElse!user@host.tld' def testHostmaskList(self): @@ -91,6 +91,13 @@ class UserTestCase(PluginTestCase): self.prefix = self.prefix2 self.assertNotError('register biff quux') 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*', 'foo') self.assertResponse('user list *f', 'biff')