From abac8307ac128fec66804298a7a6c040732d6e0c Mon Sep 17 00:00:00 2001 From: David Macek Date: Sat, 24 Apr 2021 19:35:11 +0200 Subject: [PATCH] Admin: Merge tests with the same name into one --- plugins/Admin/test.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/plugins/Admin/test.py b/plugins/Admin/test.py index 3b0476f37..9c4cea520 100644 --- a/plugins/Admin/test.py +++ b/plugins/Admin/test.py @@ -114,18 +114,10 @@ class AdminTestCase(PluginTestCase): def testNoJoinOnUnprivilegedInvite(self): try: world.testing = False - self.irc.feedMsg(ircmsgs.invite(conf.supybot.nick(), '#foo', prefix='foo!bar@baz')) - self.assertResponse('somecommand', - 'Error: "somecommand" is not a valid command.') - finally: - 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.') + for channel in '#foo', '#foo\u0009': + self.irc.feedMsg(ircmsgs.invite(conf.supybot.nick(), channel, prefix='foo!bar@baz')) + self.assertResponse('somecommand', + 'Error: "somecommand" is not a valid command.') finally: world.testing = True