def test_parse_feed_mapping_path(): expected = { "customer_id": "mussel", "feed_id": "winkle", "feed_mapping_id": "nautilus", } path = FeedMappingServiceClient.feed_mapping_path(**expected) # Check that the path construction is reversible. actual = FeedMappingServiceClient.parse_feed_mapping_path(path) assert expected == actual
def test_feed_mapping_path(): customer_id = "oyster" feed_id = "nudibranch" feed_mapping_id = "cuttlefish" expected = "customers/{customer_id}/feedMappings/{feed_id}~{feed_mapping_id}".format( customer_id=customer_id, feed_id=feed_id, feed_mapping_id=feed_mapping_id, ) actual = FeedMappingServiceClient.feed_mapping_path( customer_id, feed_id, feed_mapping_id) assert expected == actual