示例#1
0
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
示例#2
0
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
示例#3
0
def test_serialize_cloud_environment():
    env = environments.CloudEnvironment()

    serialized = CloudEnvironmentSchema().dump(env)
    assert serialized
    assert serialized["__version__"] == prefect.__version__