def test_bytes_roundtrip(): s = storage.Bytes() s.add_flow(prefect.Flow("test")) serialized = BytesSchema().dump(s) deserialized = BytesSchema().load(serialized) assert "test" in deserialized runner = deserialized.get_flow("test") assert runner.run().is_successful()
def test_bytes_empty_serialize(): b = storage.Bytes() serialized = BytesSchema().dump(b) assert serialized assert serialized["__version__"] == prefect.__version__ assert serialized["flows"] == dict()