def test_parse_campaign_path(): expected = { "customer": "cuttlefish", "campaign": "mussel", } path = CampaignServiceClient.campaign_path(**expected) # Check that the path construction is reversible. actual = CampaignServiceClient.parse_campaign_path(path) assert expected == actual
def test_campaign_path(): customer = "oyster" campaign = "nudibranch" expected = "customers/{customer}/campaigns/{campaign}".format(customer=customer, campaign=campaign, ) actual = CampaignServiceClient.campaign_path(customer, campaign) assert expected == actual