Example #1
0
 def test_handle_message_action_not_mine(self):
     message = {'type': 'message', 'data': 'another}|{/act hi'}
     self.assertEqual(msg_handler.handle_message(message, 'test'), 
         ('<b>another</b>: <strong>hi</strong>', False))
Example #2
0
 def test_handle_message_header_not_mine(self):
     message = {'type': 'message', 'data': 'another}|{/header hi'}
     self.assertEqual(msg_handler.handle_message(message, 'test'), 
         ('</br><center class="another" style="font-size:1.5em;font-weight:bold;">hi</center>', False))
Example #3
0
 def test_handle_message_action_mine(self):
     message = {'type': 'message', 'data': 'test}|{/act hi'}
     self.assertEqual(msg_handler.handle_message(message, 'test'), 
         ('<b>test</b>: <strong>hi</strong>', True))
Example #4
0
 def test_handle_message_default_not_mine(self):
     message = {'type': 'message', 'data': 'another}|{hi'}
     self.assertEqual(msg_handler.handle_message(message, 'test'), 
         ('<b>another</b>: hi', False))
Example #5
0
 def test_handle_message_default_mine(self):
     message = {'type': 'message', 'data': 'test}|{hi'}
     self.assertEqual(msg_handler.handle_message(message, 'test'), 
         ('<b>test</b>: hi', True))
Example #6
0
 def test_handle_message_subscribe(self):
     message = {'type': 'subscribe', 'data': '/quit test'}
     self.assertEqual(msg_handler.handle_message(message, 'test'), None)
Example #7
0
 def test_handle_message_quit(self):
     message = {'type': 'message', 'data': '/quit test'}
     self.assertEqual(msg_handler.handle_message(message, 'test'), ('quit', True))