def test_managed_placement_view_path(): customer_id = "squid" ad_group_id = "clam" criterion_id = "whelk" expected = "customers/{customer_id}/managedPlacementViews/{ad_group_id}~{criterion_id}".format(customer_id=customer_id, ad_group_id=ad_group_id, criterion_id=criterion_id, ) actual = ManagedPlacementViewServiceClient.managed_placement_view_path(customer_id, ad_group_id, criterion_id) assert expected == actual
def test_parse_managed_placement_view_path(): expected = { "customer_id": "octopus", "ad_group_id": "oyster", "criterion_id": "nudibranch", } path = ManagedPlacementViewServiceClient.managed_placement_view_path(**expected) # Check that the path construction is reversible. actual = ManagedPlacementViewServiceClient.parse_managed_placement_view_path(path) assert expected == actual