mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Added test to make sure .sendMsg went before .queueMsg.
This commit is contained in:
parent
4ca8f91fa9
commit
c07468e275
@ -199,7 +199,11 @@ class IrcStateTestCase(unittest.TestCase):
|
||||
"""
|
||||
|
||||
class IrcTestCase(unittest.TestCase):
|
||||
irc = irclib.Irc('nick')
|
||||
def setUp(self):
|
||||
self.irc = irclib.Irc('nick')
|
||||
_ = self.irc.takeMsg() # NICK
|
||||
_ = self.irc.takeMsg() # USER
|
||||
|
||||
def testPingResponse(self):
|
||||
self.irc.feedMsg(ircmsgs.ping('123'))
|
||||
self.assertEqual(ircmsgs.pong('123'), self.irc.takeMsg())
|
||||
@ -210,6 +214,14 @@ class IrcTestCase(unittest.TestCase):
|
||||
msg = self.irc.takeMsg()
|
||||
self.failUnless(msg.command == 'NICK' and msg.args[0] != self.irc.nick)
|
||||
|
||||
def testSendBeforeQueue(self):
|
||||
self.irc.queueMsg(ircmsgs.IrcMsg('NOTICE #foo bar'))
|
||||
self.irc.sendMsg(ircmsgs.IrcMsg('PRIVMSG #foo yeah!'))
|
||||
msg = self.irc.takeMsg()
|
||||
self.failUnless(msg.command == 'PRIVMSG')
|
||||
msg = self.irc.takeMsg()
|
||||
self.failUnless(msg.command == 'NOTICE')
|
||||
|
||||
def testReset(self):
|
||||
for msg in msgs:
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user