Ejemplo n.º 1
0
 def test__body(self):
     msg = manager_worker_broker._Message('src', 'topic_name', 'message_name', ('body', 0))
     self.assertTrue(repr(msg))
     s = msg.dumps()
     new_msg = manager_worker_broker._Message.loads(s)
     self.assertEqual(new_msg.name, 'message_name')
     self.assertEqual(new_msg.args, ('body', 0))
     self.assertEqual(new_msg.topic_name, 'topic_name')
     self.assertEqual(new_msg.src, 'src')
Ejemplo n.º 2
0
 def test__body(self):
     msg = manager_worker_broker._Message('src', 'topic_name', 'message_name', ('body', 0))
     self.assertTrue(repr(msg))
     s = msg.dumps()
     new_msg = manager_worker_broker._Message.loads(s)
     self.assertEqual(new_msg.name, 'message_name')
     self.assertEqual(new_msg.args, ('body', 0))
     self.assertEqual(new_msg.topic_name, 'topic_name')
     self.assertEqual(new_msg.src, 'src')