AttackProtector: fix testCleanCollectionAfterPunishment
parent
c1ae33edd0
commit
6efff4e630
|
@ -96,6 +96,9 @@ class AttackProtectorDatabase:
|
|||
detection = protector.registryValue(kind + '.detection', channel)
|
||||
if count >= int(filterParser.match(detection).group('number')):
|
||||
protector._slot(lastItem)
|
||||
for index, item in enumerate(collection):
|
||||
if item.prefix == prefix and item.channel == channel:
|
||||
collection.pop(index)
|
||||
|
||||
|
||||
class AttackProtector(callbacks.Plugin):
|
||||
|
|
|
@ -188,7 +188,7 @@ class AttackProtectorTestCase(ChannelPluginTestCase):
|
|||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||
self._getIfAnswerIsThisBan()
|
||||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||
self.failIf(self._getIfAnswerIsThisBan() == False,
|
||||
self.failIf(self._getIfAnswerIsThisBan(),
|
||||
'Doesn\'t clean the join collection after having banned.')
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue