Example #1
0
def test_parse_conversion_action_path():
    expected = {
        "customer_id": "whelk",
        "conversion_action_id": "octopus",
    }
    path = CustomerServiceClient.conversion_action_path(**expected)

    # Check that the path construction is reversible.
    actual = CustomerServiceClient.parse_conversion_action_path(path)
    assert expected == actual
Example #2
0
def test_conversion_action_path():
    customer_id = "squid"
    conversion_action_id = "clam"
    expected = "customers/{customer_id}/conversionActions/{conversion_action_id}".format(
        customer_id=customer_id,
        conversion_action_id=conversion_action_id,
    )
    actual = CustomerServiceClient.conversion_action_path(
        customer_id, conversion_action_id)
    assert expected == actual