Ejemplo n.º 1
0
 def test_parse_three_items(self):
     self.assertEqual(
         IrcMessageTagsReadOnly.parseTags(
             'Kappa=Kippa;BibleThump;FrankerZ=RalpherZ'), {
                 'Kappa': 'Kippa',
                 'BibleThump': True,
                 'FrankerZ': 'RalpherZ'
             })
Ejemplo n.º 2
0
    def test_parse_twitch_tags(self):
        items = IrcMessageTagsReadOnly.parseTags('''\
badges=broadcaster/1;color=;display-name=BotGotsThis;emote-sets=0;mod=0;\
subscriber=0;turbo=0;user-type=''')
        self.assertEqual(items['badges'], 'broadcaster/1')
        self.assertEqual(items['color'], '')
        self.assertEqual(items['display-name'], 'BotGotsThis')
        self.assertEqual(items['emote-sets'], '0')
        self.assertEqual(items['mod'], '0')
        self.assertEqual(items['subscriber'], '0')
        self.assertEqual(items['turbo'], '0')
        self.assertEqual(items['user-type'], '')
Ejemplo n.º 3
0
    def test_parse_twitch_bits(self):
        IrcMessageTagsReadOnly.parseTags('''\
badges=staff/1,bits/1000;bits=100;color=;display-name=TWITCH_UserNaME;emotes=;\
id=b34ccfc7-4977-403a-8a94-33c6bac34fb8;mod=0;room-id=1337;subscriber=0;\
turbo=1;user-id=1337;user-type=staff''')
Ejemplo n.º 4
0
 def test_parse_key_value(self):
     self.assertEqual(IrcMessageTagsReadOnly.parseTags('Kappa=Kippa'),
                      {'Kappa': 'Kippa'})
Ejemplo n.º 5
0
 def test_parse_key_vendor(self):
     self.assertEqual(IrcMessageTagsReadOnly.parseTags('Kappa/Keepo'),
                      {'Kappa/Keepo': True})
Ejemplo n.º 6
0
 def test_parse_key(self):
     items = IrcMessageTagsReadOnly.parseTags('Kappa')
     self.assertEqual(items, {'Kappa': True})
Ejemplo n.º 7
0
 def test_parse_empty(self):
     items = IrcMessageTagsReadOnly.parseTags('')
     self.assertIsInstance(items, Dict)
     self.assertEqual(items, IrcMessageTagsReadOnly())