예제 #1
0
    def test_serialize_deserialize_are_inverses(self):
        serialized = _SourceTestMap.serialize(self.obj, self.lookup)
        actual = _SourceTestMap.deserialize((serialized,
                                             self.reverse_lookup))

        self.assertEqual(actual, self.obj)
예제 #2
0
 def test_serialize(self):
     self.assertEqual(_SourceTestMap.serialize(self.obj, self.lookup),
                      self.expected_serialized_data)