def test_campaign_audience_view_path(): customer_id = "squid" campaign_id = "clam" criterion_id = "whelk" expected = "customers/{customer_id}/campaignAudienceViews/{campaign_id}~{criterion_id}".format(customer_id=customer_id, campaign_id=campaign_id, criterion_id=criterion_id, ) actual = CampaignAudienceViewServiceClient.campaign_audience_view_path(customer_id, campaign_id, criterion_id) assert expected == actual
def test_parse_campaign_audience_view_path(): expected = { "customer_id": "octopus", "campaign_id": "oyster", "criterion_id": "nudibranch", } path = CampaignAudienceViewServiceClient.campaign_audience_view_path(**expected) # Check that the path construction is reversible. actual = CampaignAudienceViewServiceClient.parse_campaign_audience_view_path(path) assert expected == actual