Beispiel #1
0
def test_company_path():
    project = "squid"
    tenant = "clam"
    company = "whelk"
    expected = "projects/{project}/tenants/{tenant}/companies/{company}".format(
        project=project, tenant=tenant, company=company,
    )
    actual = CompletionClient.company_path(project, tenant, company)
    assert expected == actual
Beispiel #2
0
def test_parse_company_path():
    expected = {
        "project": "octopus",
        "tenant": "oyster",
        "company": "nudibranch",
    }
    path = CompletionClient.company_path(**expected)

    # Check that the path construction is reversible.
    actual = CompletionClient.parse_company_path(path)
    assert expected == actual