mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-29 15:01:05 -05:00
Admin: Actually clean up test channel from configuration
943f39745dd23ffca9ec5a45eaf25b2efd4625e5 did not actually because: 1. the 'part' command is not available (it's in the Channel plugin) so it just didn't do anything 2. one of the tests was missing the cleanup
This commit is contained in:
parent
6758c00363
commit
d435442b39
@ -50,6 +50,7 @@ class AdminTestCase(PluginTestCase):
|
|||||||
self.irc.feedMsg(ircmsgs.join('#Baz', prefix=self.prefix))
|
self.irc.feedMsg(ircmsgs.join('#Baz', prefix=self.prefix))
|
||||||
getAfterJoinMessages()
|
getAfterJoinMessages()
|
||||||
self.assertRegexp('channels', '#bar, #Baz, and #foo')
|
self.assertRegexp('channels', '#bar, #Baz, and #foo')
|
||||||
|
self.assertNotRegexp('config networks.test.channels', '.*#foo.*')
|
||||||
|
|
||||||
def testIgnoreAddRemove(self):
|
def testIgnoreAddRemove(self):
|
||||||
self.assertNotError('admin ignore add foo!bar@baz')
|
self.assertNotError('admin ignore add foo!bar@baz')
|
||||||
@ -96,7 +97,7 @@ class AdminTestCase(PluginTestCase):
|
|||||||
self.assertEqual(m.args[0], '#foo')
|
self.assertEqual(m.args[0], '#foo')
|
||||||
self.assertEqual(m.args[1], 'key')
|
self.assertEqual(m.args[1], 'key')
|
||||||
finally:
|
finally:
|
||||||
self.getMsg('part #foo')
|
conf.supybot.networks.test.channels.setValue('')
|
||||||
|
|
||||||
def testNick(self):
|
def testNick(self):
|
||||||
try:
|
try:
|
||||||
@ -110,10 +111,13 @@ class AdminTestCase(PluginTestCase):
|
|||||||
self.assertError('admin capability add %s owner' % self.nick)
|
self.assertError('admin capability add %s owner' % self.nick)
|
||||||
|
|
||||||
def testJoinOnOwnerInvite(self):
|
def testJoinOnOwnerInvite(self):
|
||||||
self.irc.feedMsg(ircmsgs.invite(conf.supybot.nick(), '#foo', prefix=self.prefix))
|
try:
|
||||||
m = self.getMsg(' ')
|
self.irc.feedMsg(ircmsgs.invite(conf.supybot.nick(), '#foo', prefix=self.prefix))
|
||||||
self.assertEqual(m.command, 'JOIN')
|
m = self.getMsg(' ')
|
||||||
self.assertEqual(m.args[0], '#foo')
|
self.assertEqual(m.command, 'JOIN')
|
||||||
|
self.assertEqual(m.args[0], '#foo')
|
||||||
|
finally:
|
||||||
|
conf.supybot.networks.test.channels.setValue('')
|
||||||
|
|
||||||
def testNoJoinOnUnprivilegedInvite(self):
|
def testNoJoinOnUnprivilegedInvite(self):
|
||||||
try:
|
try:
|
||||||
@ -124,6 +128,7 @@ class AdminTestCase(PluginTestCase):
|
|||||||
'Error: "somecommand" is not a valid command.')
|
'Error: "somecommand" is not a valid command.')
|
||||||
finally:
|
finally:
|
||||||
world.testing = True
|
world.testing = True
|
||||||
|
self.assertNotRegexp('config networks.test.channels', '.*#foo.*')
|
||||||
|
|
||||||
def testAcmd(self):
|
def testAcmd(self):
|
||||||
self.irc.feedMsg(ircmsgs.join('#foo', prefix=self.prefix))
|
self.irc.feedMsg(ircmsgs.join('#foo', prefix=self.prefix))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user