Tests for tags.

This commit is contained in:
Jeremy Fincher 2004-09-16 14:50:34 +00:00
parent d631b3ea1b
commit a8ce25a3ee

View File

@ -115,6 +115,16 @@ class IrcMsgTestCase(SupyTestCase):
self.assertRaises(ircmsgs.MalformedIrcMsg, ircmsgs.IrcMsg, self.assertRaises(ircmsgs.MalformedIrcMsg, ircmsgs.IrcMsg,
args=('biff',), prefix='foo!bar@baz') args=('biff',), prefix='foo!bar@baz')
def testTags(self):
m = ircmsgs.privmsg('foo', 'bar')
self.failIf(m.repliedTo)
m.tag('repliedTo')
self.failUnless(m.repliedTo)
m.tag('repliedTo')
self.failUnless(m.repliedTo)
m.tag('repliedTo', 12)
self.assertEqual(m.repliedTo, 12)
class FunctionsTestCase(SupyTestCase): class FunctionsTestCase(SupyTestCase):
def testIsAction(self): def testIsAction(self):
L = [':jemfinch!~jfincher@ts26-2.homenet.ohio-state.edu PRIVMSG' L = [':jemfinch!~jfincher@ts26-2.homenet.ohio-state.edu PRIVMSG'