def test_good_string(self): ircmsg, actor = botcode.parse_messages( ":[email protected] PRIVMSG #deathstar : I find your lack of faith disturbing" ) self.assertEqual([ircmsg, actor], [ ':[email protected] PRIVMSG #deathstar : I find your lack of faith disturbing', 'vader' ])
def test_bad_string(self): ircmsg, actor = botcode.parse_messages( "we should probably replace this with a bad string more likely to occur" ) self.assertEqual([ircmsg, actor], [None, None])
def test_bad_string(self): ircmsg, actor = botcode.parse_messages("we should probably replace this with a bad string more likely to occur") self.assertEqual([ircmsg, actor], [None, None])
def test_good_string(self): ircmsg, actor = botcode.parse_messages(":[email protected] PRIVMSG #deathstar : I find your lack of faith disturbing") self.assertEqual([ircmsg, actor], [':[email protected] PRIVMSG #deathstar : I find your lack of faith disturbing', 'vader'])