mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-26 13:01:06 -05:00
Avoid listing all permutations
This commit is contained in:
parent
1cbf992016
commit
d5af301db1
@ -29,8 +29,6 @@
|
|||||||
# POSSIBILITY OF SUCH DAMAGE.
|
# POSSIBILITY OF SUCH DAMAGE.
|
||||||
###
|
###
|
||||||
|
|
||||||
import itertools
|
|
||||||
|
|
||||||
from supybot.test import *
|
from supybot.test import *
|
||||||
|
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
@ -165,10 +163,10 @@ class ChannelTestCase(ChannelPluginTestCase):
|
|||||||
|
|
||||||
def assertKban(self, query, *hostmasks, **kwargs):
|
def assertKban(self, query, *hostmasks, **kwargs):
|
||||||
m = self.getMsg(query, **kwargs)
|
m = self.getMsg(query, **kwargs)
|
||||||
self.assertIn(m, [
|
self.assertEqual(m.command, "MODE", m)
|
||||||
ircmsgs.bans(self.channel, permutation)
|
self.assertEqual(m.args[0], self.channel, m)
|
||||||
for permutation in itertools.permutations(hostmasks)
|
self.assertEqual(m.args[1], "+" + "b" * len(hostmasks), m)
|
||||||
])
|
self.assertCountEqual(m.args[2:], hostmasks, m)
|
||||||
|
|
||||||
m = self.getMsg(' ')
|
m = self.getMsg(' ')
|
||||||
self.assertEqual(m.command, 'KICK')
|
self.assertEqual(m.command, 'KICK')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user