예제 #1
0
def test_endpoint_path():
    project = "squid"
    location = "clam"
    endpoint = "whelk"
    expected = "projects/{project}/locations/{location}/endpoints/{endpoint}".format(project=project, location=location, endpoint=endpoint, )
    actual = PredictionServiceClient.endpoint_path(project, location, endpoint)
    assert expected == actual
예제 #2
0
def test_parse_endpoint_path():
    expected = {
        "project": "octopus",
        "location": "oyster",
        "endpoint": "nudibranch",
    }
    path = PredictionServiceClient.endpoint_path(**expected)

    # Check that the path construction is reversible.
    actual = PredictionServiceClient.parse_endpoint_path(path)
    assert expected == actual