mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Fix some test failures.
This commit is contained in:
parent
bd6aa8fda8
commit
e3d4478d82
@ -130,9 +130,10 @@ class Seen(callbacks.Plugin):
|
||||
self.ircstates[irc] = irclib.IrcState()
|
||||
if irc not in self.lastmsg:
|
||||
self.lastmsg[irc] = ircmsgs.ping('this is just a fake message')
|
||||
for channel in irc.state.channels:
|
||||
irc.queueMsg(ircmsgs.who(channel))
|
||||
irc.queueMsg(ircmsgs.names(channel))
|
||||
if not world.testing:
|
||||
for channel in irc.state.channels:
|
||||
irc.queueMsg(ircmsgs.who(channel))
|
||||
irc.queueMsg(ircmsgs.names(channel))
|
||||
|
||||
def doPrivmsg(self, irc, msg):
|
||||
if irc.isChannel(msg.args[0]):
|
||||
|
@ -50,13 +50,9 @@ class ChannelDBTestCase(ChannelPluginTestCase):
|
||||
self.assertNotRegexp('seen asldfkjasdlfkj', 'KeyError')
|
||||
|
||||
def testAny(self):
|
||||
self.irc.feedMsg(ircmsgs.join(self.channel, 'baz!foo@bar'))
|
||||
self.assertRegexp('seen any', 'baz has joined')
|
||||
self.irc.feedMsg(ircmsgs.part(self.channel, 'baz!foo@bar'))
|
||||
self.assertRegexp('seen any', 'baz has parted')
|
||||
self.irc.feedMsg(ircmsgs.mode(self.channel, args=('+o', 'baz'),
|
||||
prefix='baz!foo@bar'))
|
||||
self.assertRegexp('seen any baz', 'baz sets mode')
|
||||
self.assertRegexp('seen any', 'test has joined')
|
||||
self.irc.feedMsg(ircmsgs.mode(self.channel, args=('+o', self.nick),
|
||||
prefix=self.prefix))
|
||||
self.assertRegexp('seen any %s' % self.nick,
|
||||
'^%s was last seen' % self.nick)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user