Example #1
0
def test_parse_user_location_view_path():
    expected = {
        "customer_id": "octopus",
        "country_criterion_id": "oyster",
        "is_targeting_location": "nudibranch",
    }
    path = UserLocationViewServiceClient.user_location_view_path(**expected)

    # Check that the path construction is reversible.
    actual = UserLocationViewServiceClient.parse_user_location_view_path(path)
    assert expected == actual
Example #2
0
def test_user_location_view_path():
    customer_id = "squid"
    country_criterion_id = "clam"
    is_targeting_location = "whelk"
    expected = "customers/{customer_id}/userLocationViews/{country_criterion_id}~{is_targeting_location}".format(
        customer_id=customer_id,
        country_criterion_id=country_criterion_id,
        is_targeting_location=is_targeting_location,
    )
    actual = UserLocationViewServiceClient.user_location_view_path(
        customer_id, country_criterion_id, is_targeting_location)
    assert expected == actual