def test_dump_message(self): m = Mock() m.body = 'the quick brown fox' m.properties = {'a': 1} m.delivery_info = {'exchange': 'bar'} self.assertTrue(dump_message(m))
def test_dump_message_no_message(self): self.assertIn('No messages in queue', dump_message(None))
def test_dump_message(self): m = Mock() m.body = "the quick brown fox" m.properties = {"a": 1} m.delivery_info = {"exchange": "bar"} self.assertTrue(dump_message(m))