mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 04:32:36 +01:00
Fix tests broken by 6a06ca991
.
This commit is contained in:
parent
790f0eea35
commit
84148988b3
@ -33,6 +33,8 @@ class AdminTestCase(PluginTestCase):
|
|||||||
plugins = ('Admin',)
|
plugins = ('Admin',)
|
||||||
def testChannels(self):
|
def testChannels(self):
|
||||||
def getAfterJoinMessages():
|
def getAfterJoinMessages():
|
||||||
|
m = self.irc.takeMsg()
|
||||||
|
self.assertEqual(m.command, 'MODE')
|
||||||
m = self.irc.takeMsg()
|
m = self.irc.takeMsg()
|
||||||
self.assertEqual(m.command, 'MODE')
|
self.assertEqual(m.command, 'MODE')
|
||||||
m = self.irc.takeMsg()
|
m = self.irc.takeMsg()
|
||||||
@ -94,6 +96,8 @@ class AdminTestCase(PluginTestCase):
|
|||||||
|
|
||||||
def testPart(self):
|
def testPart(self):
|
||||||
def getAfterJoinMessages():
|
def getAfterJoinMessages():
|
||||||
|
m = self.irc.takeMsg()
|
||||||
|
self.assertEqual(m.command, 'MODE')
|
||||||
m = self.irc.takeMsg()
|
m = self.irc.takeMsg()
|
||||||
self.assertEqual(m.command, 'MODE')
|
self.assertEqual(m.command, 'MODE')
|
||||||
m = self.irc.takeMsg()
|
m = self.irc.takeMsg()
|
||||||
|
@ -506,10 +506,6 @@ class IrcState(IrcCommandDispatcher):
|
|||||||
self.channels[channel] = chan
|
self.channels[channel] = chan
|
||||||
# I don't know why this assert was here.
|
# I don't know why this assert was here.
|
||||||
#assert msg.nick == irc.nick, msg
|
#assert msg.nick == irc.nick, msg
|
||||||
if msg.nick == irc.nick:
|
|
||||||
# Ask for the ban list
|
|
||||||
for channel in msg.args[0].split(','):
|
|
||||||
irc.queueMsg(ircmsgs.mode(channel, '+b'))
|
|
||||||
|
|
||||||
def do367(self, irc, msg):
|
def do367(self, irc, msg):
|
||||||
# Example:
|
# Example:
|
||||||
@ -1007,6 +1003,8 @@ class Irc(IrcCommandDispatcher):
|
|||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
self.queueMsg(ircmsgs.who(channel)) # Ends with 315.
|
self.queueMsg(ircmsgs.who(channel)) # Ends with 315.
|
||||||
self.queueMsg(ircmsgs.mode(channel)) # Ends with 329.
|
self.queueMsg(ircmsgs.mode(channel)) # Ends with 329.
|
||||||
|
for channel in msg.args[0].split(','):
|
||||||
|
self.queueMsg(ircmsgs.mode(channel, '+b'))
|
||||||
self.startedSync[channel] = time.time()
|
self.startedSync[channel] = time.time()
|
||||||
|
|
||||||
def do315(self, msg):
|
def do315(self, msg):
|
||||||
|
@ -241,6 +241,10 @@ def separateModes(args):
|
|||||||
else:
|
else:
|
||||||
requireArguments = _minusRequireArguments
|
requireArguments = _minusRequireArguments
|
||||||
if c in requireArguments:
|
if c in requireArguments:
|
||||||
|
if not args:
|
||||||
|
# It happens, for example with "MODE #channel +b", which
|
||||||
|
# is used for getting the list of all bans.
|
||||||
|
continue
|
||||||
arg = args.pop(0)
|
arg = args.pop(0)
|
||||||
try:
|
try:
|
||||||
arg = int(arg)
|
arg = int(arg)
|
||||||
|
@ -401,6 +401,9 @@ class ChannelPluginTestCase(PluginTestCase):
|
|||||||
self.assertEqual(m.command, 'MODE')
|
self.assertEqual(m.command, 'MODE')
|
||||||
m = self.irc.takeMsg()
|
m = self.irc.takeMsg()
|
||||||
self.failIf(m is None, 'No message back from joining channel.')
|
self.failIf(m is None, 'No message back from joining channel.')
|
||||||
|
self.assertEqual(m.command, 'MODE')
|
||||||
|
m = self.irc.takeMsg()
|
||||||
|
self.failIf(m is None, 'No message back from joining channel.')
|
||||||
self.assertEqual(m.command, 'WHO')
|
self.assertEqual(m.command, 'WHO')
|
||||||
|
|
||||||
def _feedMsg(self, query, timeout=None, to=None, frm=None, private=False,
|
def _feedMsg(self, query, timeout=None, to=None, frm=None, private=False,
|
||||||
|
Loading…
Reference in New Issue
Block a user