def test_action_message(self): parsed = TwitchClient.parse_message('@color=#FF69B4;display-name=Mancowbeaar;emotes=60257:0-6/28087:8-14;subscriber=1;turbo=0;user-type= :[email protected] PRIVMSG #forsenlol :\x01ACTION forsenX WutFace\x01\n') self.assertEqual(parsed['channel'], "#forsenlol") self.assertEqual(parsed['message'], "forsenX WutFace")
def test_not_a_message(self): parsed = TwitchClient.parse_message('@broadcaster-lang=;r9k=0;slow=0;subs-only=1 :tmi.twitch.tv ROOMSTATE #sc2proleague\n') self.assertEqual(parsed, None)