def test_serialize_cloud_environment_with_private_registry(): env = environments.CloudEnvironment(private_registry=True) schema = CloudEnvironmentSchema() serialized = schema.dump(env) assert serialized assert serialized["__version__"] == prefect.__version__ assert serialized["private_registry"] is True new = schema.load(serialized) assert new.private_registry is True
def test_serialize_cloud_environment(): env = environments.CloudEnvironment() schema = CloudEnvironmentSchema() serialized = schema.dump(env) assert serialized assert serialized["__version__"] == prefect.__version__ assert serialized["docker_secret"] is None new = schema.load(serialized) assert new.private_registry is False assert new.docker_secret is None
def test_serialize_cloud_environment(): env = environments.CloudEnvironment() serialized = CloudEnvironmentSchema().dump(env) assert serialized assert serialized["__version__"] == prefect.__version__