def test_detailed_demographic_path():
    customer_id = "squid"
    detailed_demographic_id = "clam"
    expected = "customers/{customer_id}/detailedDemographics/{detailed_demographic_id}".format(
        customer_id=customer_id,
        detailed_demographic_id=detailed_demographic_id,
    )
    actual = DetailedDemographicServiceClient.detailed_demographic_path(
        customer_id, detailed_demographic_id)
    assert expected == actual
def test_parse_detailed_demographic_path():
    expected = {
        "customer_id": "whelk",
        "detailed_demographic_id": "octopus",
    }
    path = DetailedDemographicServiceClient.detailed_demographic_path(
        **expected)

    # Check that the path construction is reversible.
    actual = DetailedDemographicServiceClient.parse_detailed_demographic_path(
        path)
    assert expected == actual