def test_parse_topic_view_path(): expected = { "customer_id": "octopus", "ad_group_id": "oyster", "criterion_id": "nudibranch", } path = TopicViewServiceClient.topic_view_path(**expected) # Check that the path construction is reversible. actual = TopicViewServiceClient.parse_topic_view_path(path) assert expected == actual
def test_topic_view_path(): customer_id = "squid" ad_group_id = "clam" criterion_id = "whelk" expected = "customers/{customer_id}/topicViews/{ad_group_id}~{criterion_id}".format( customer_id=customer_id, ad_group_id=ad_group_id, criterion_id=criterion_id, ) actual = TopicViewServiceClient.topic_view_path(customer_id, ad_group_id, criterion_id) assert expected == actual