Admin: Merge tests with the same name into one

This commit is contained in:
David Macek 2021-04-24 19:35:11 +02:00 committed by Valentin Lorentz
parent 4d2efc65ef
commit abac8307ac

View File

@ -114,18 +114,10 @@ class AdminTestCase(PluginTestCase):
def testNoJoinOnUnprivilegedInvite(self): def testNoJoinOnUnprivilegedInvite(self):
try: try:
world.testing = False world.testing = False
self.irc.feedMsg(ircmsgs.invite(conf.supybot.nick(), '#foo', prefix='foo!bar@baz')) for channel in '#foo', '#foo\u0009':
self.assertResponse('somecommand', self.irc.feedMsg(ircmsgs.invite(conf.supybot.nick(), channel, prefix='foo!bar@baz'))
'Error: "somecommand" is not a valid command.') self.assertResponse('somecommand',
finally: 'Error: "somecommand" is not a valid command.')
world.testing = True
def testNoJoinOnUnprivilegedInvite(self):
try:
world.testing = False
self.irc.feedMsg(ircmsgs.invite(conf.supybot.nick(), '#foo\u0009', prefix='foo!bar@baz'))
self.assertResponse('somecommand',
'Error: "somecommand" is not a valid command.')
finally: finally:
world.testing = True world.testing = True