def test_product_group_view_path(): customer_id = "squid" adgroup_id = "clam" criterion_id = "whelk" expected = "customers/{customer_id}/productGroupViews/{adgroup_id}~{criterion_id}".format(customer_id=customer_id, adgroup_id=adgroup_id, criterion_id=criterion_id, ) actual = ProductGroupViewServiceClient.product_group_view_path(customer_id, adgroup_id, criterion_id) assert expected == actual
def test_parse_product_group_view_path(): expected = { "customer_id": "octopus", "adgroup_id": "oyster", "criterion_id": "nudibranch", } path = ProductGroupViewServiceClient.product_group_view_path(**expected) # Check that the path construction is reversible. actual = ProductGroupViewServiceClient.parse_product_group_view_path(path) assert expected == actual