def test_binary_deserialize(self): """ BinaryAttribute.deserialize """ attr = BinaryAttribute() serial = b64encode(b'foo').decode(DEFAULT_ENCODING) assert attr.deserialize(serial) == b'foo'
def test_binary_deserialize(self): """ BinaryAttribute.deserialize """ attr = BinaryAttribute() serial = b64encode(b'foo').decode(DEFAULT_ENCODING) self.assertEqual(attr.deserialize(serial), b'foo')
def test_binary_round_trip(self): """ BinaryAttribute round trip """ attr = BinaryAttribute() value = b'foo' serial = attr.serialize(value) assert attr.deserialize(serial) == value
def test_binary_round_trip(self): """ BinaryAttribute round trip """ attr = BinaryAttribute() value = b'foo' serial = attr.serialize(value) self.assertEqual(attr.deserialize(serial), value)