def test_serialize_in_sync_with_deserialize(self): ty = ObjectRefType.Host ident = "node1" ref = ObjectRef.deserialize(ObjectRef(ty, ident).serialize()) assert ref.object_type == ty assert ref.ident == ident assert ref.labels == {}
def test_serialize_in_sync_with_deserialize_with_labels(self): ty = ObjectRefType.Host ident = "node1" labels = {"abc": "123"} ref = ObjectRef.deserialize(ObjectRef(ty, ident, labels).serialize()) assert ref.object_type == ty assert ref.ident == ident assert ref.labels == labels