def test_parse_campaign_criterion_path(): expected = { "customer_id": "abalone", "campaign_id": "squid", "criterion_id": "clam", } path = ChangeStatusServiceClient.campaign_criterion_path(**expected) # Check that the path construction is reversible. actual = ChangeStatusServiceClient.parse_campaign_criterion_path(path) assert expected == actual
def test_campaign_criterion_path(): customer_id = "winkle" campaign_id = "nautilus" criterion_id = "scallop" expected = "customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}".format( customer_id=customer_id, campaign_id=campaign_id, criterion_id=criterion_id, ) actual = ChangeStatusServiceClient.campaign_criterion_path( customer_id, campaign_id, criterion_id) assert expected == actual