def test_parsing_exception(self): with pytest.raises(PipelineMessageError): Message.deserialize(b"HFHGKDJFHG")
def test_serialization_compression_unicode(self): message = Message(content={"key": u"message \u6D88\u606F"}) result = Message.deserialize(message.serialize(compress=True)) self.assertDictEqual(message.content, result.content)