def test_parse_domain_category_path(): expected = { "customer_id": "winkle", "campaign_id": "nautilus", "base64_category": "scallop", "language_code": "abalone", } path = DomainCategoryServiceClient.domain_category_path(**expected) # Check that the path construction is reversible. actual = DomainCategoryServiceClient.parse_domain_category_path(path) assert expected == actual
def test_domain_category_path(): customer_id = "oyster" campaign_id = "nudibranch" base64_category = "cuttlefish" language_code = "mussel" expected = "customers/{customer_id}/domainCategories/{campaign_id}~{base64_category}~{language_code}".format( customer_id=customer_id, campaign_id=campaign_id, base64_category=base64_category, language_code=language_code, ) actual = DomainCategoryServiceClient.domain_category_path( customer_id, campaign_id, base64_category, language_code) assert expected == actual