def test_queue_msg_not_serializable(self): # mostly just testing that encoder does not error on data that cannot # be json encoded protonmsg.queue_msg('*****@*****.**', {'testheader': 1}, object()) self.assertMsg('*****@*****.**', body=None, testheader=1)
def test_queue_msg(self): protonmsg.queue_msg('test.msg', {'testheader': 1}, 'test body') self.assertMsg('test.msg', body='"test body"', testheader=1)
def test_queue_msg(self): protonmsg.queue_msg('test.msg', {'testheader': 1}, {"test": "body"}) self.assertMsg('test.msg', body={"test": "body"}, testheader=1)