コード例 #1
0
def test_parse_instance_path():
    expected = {"project": "octopus", "location": "oyster", "instance": "nudibranch"}
    path = CloudMemcacheClient.instance_path(**expected)

    # Check that the path construction is reversible.
    actual = CloudMemcacheClient.parse_instance_path(path)
    assert expected == actual
コード例 #2
0
def test_instance_path():
    project = "squid"
    location = "clam"
    instance = "whelk"

    expected = "projects/{project}/locations/{location}/instances/{instance}".format(
        project=project, location=location, instance=instance)
    actual = CloudMemcacheClient.instance_path(project, location, instance)
    assert expected == actual