Beispiel #1
0
def test_environment_path():
    project = "squid"
    environment = "clam"

    expected = "projects/{project}/agent/environments/{environment}".format(
        project=project, environment=environment,
    )
    actual = EnvironmentsClient.environment_path(project, environment)
    assert expected == actual
Beispiel #2
0
def test_parse_environment_path():
    expected = {
        "project": "whelk",
        "environment": "octopus",
    }
    path = EnvironmentsClient.environment_path(**expected)

    # Check that the path construction is reversible.
    actual = EnvironmentsClient.parse_environment_path(path)
    assert expected == actual