def test_campaign_extension_setting_path(): customer_id = "oyster" campaign_id = "nudibranch" extension_type = "cuttlefish" expected = "customers/{customer_id}/campaignExtensionSettings/{campaign_id}~{extension_type}".format( customer_id=customer_id, campaign_id=campaign_id, extension_type=extension_type, ) actual = CampaignExtensionSettingServiceClient.campaign_extension_setting_path( customer_id, campaign_id, extension_type) assert expected == actual
def test_parse_campaign_extension_setting_path(): expected = { "customer_id": "mussel", "campaign_id": "winkle", "extension_type": "nautilus", } path = CampaignExtensionSettingServiceClient.campaign_extension_setting_path( **expected) # Check that the path construction is reversible. actual = CampaignExtensionSettingServiceClient.parse_campaign_extension_setting_path( path) assert expected == actual