Make it less annoying to pickle messages

This commit is contained in:
Salad Dais
2021-05-06 02:41:12 +00:00
parent 95e34bb07a
commit 8af87befbd
3 changed files with 10 additions and 4 deletions

View File

@@ -126,8 +126,6 @@ class TestMessage(unittest.TestCase):
def test_partial_decode_pickle(self):
msg = self.deserial.deserialize(self.serial.serialize(self.chat_msg))
self.assertEqual(msg.deserializer(), self.deserial)
# Have to remove the weak ref so we can pickle
msg.deserializer = None
msg = pickle.loads(pickle.dumps(msg, protocol=pickle.HIGHEST_PROTOCOL))
# We should still have the raw body at this point