mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-02 16:09:24 +01:00
Extra, more accurate asserts can't hurt.
This commit is contained in:
parent
82d6966885
commit
4d04bb546d
@ -142,7 +142,7 @@ class PluginTestCase(SupyTestCase):
|
|||||||
raise ValueError, 'PluginTestCase must have a "plugins" attribute.'
|
raise ValueError, 'PluginTestCase must have a "plugins" attribute.'
|
||||||
self.nick = nick
|
self.nick = nick
|
||||||
self.prefix = ircutils.joinHostmask(nick, 'user', 'host.domain.tld')
|
self.prefix = ircutils.joinHostmask(nick, 'user', 'host.domain.tld')
|
||||||
self.irc = irclib.Irc(nick)
|
self.irc = irclib.Irc('test')
|
||||||
while self.irc.takeMsg():
|
while self.irc.takeMsg():
|
||||||
pass
|
pass
|
||||||
#OwnerModule = Owner.loadPluginModule('Owner')
|
#OwnerModule = Owner.loadPluginModule('Owner')
|
||||||
@ -311,8 +311,10 @@ class ChannelPluginTestCase(PluginTestCase):
|
|||||||
PluginTestCase.setUp(self)
|
PluginTestCase.setUp(self)
|
||||||
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
self.irc.feedMsg(ircmsgs.join(self.channel, prefix=self.prefix))
|
||||||
m = self.irc.takeMsg()
|
m = self.irc.takeMsg()
|
||||||
|
self.failIf(m is None, 'No message back from joining channel.')
|
||||||
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.assertEqual(m.command, 'WHO')
|
self.assertEqual(m.command, 'WHO')
|
||||||
|
|
||||||
def _feedMsg(self, query, timeout=None, to=None, frm=None):
|
def _feedMsg(self, query, timeout=None, to=None, frm=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user