Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove item link from google_merchant
IKarbowiak11c9f01c55a0
diff --git a/saleor/data_feeds/google_merchant.py b/saleor/data_feeds/google_merchant.pyindex 151c0142d2..73b145539f 100644--- a/saleor/data_feeds/google_merchant.py+++ b/saleor/data_feeds/google_merchant.py@@ -24,7 +24,6 @@ ATTRIBUTES = ["title","product_type","google_product_category",- "link","image_link","condition","availability",@@ -71,12 +70,6 @@ def item_guid(item: ProductVariant):return item.sku-# It should returns url to item, but right now-# there is no way to get product_variant url-def item_link(item: ProductVariant, current_site):- return add_domain(current_site.domain, "", not settings.DEBUG)--def item_title(item: ProductVariant):return item.display_product()@@ -199,7 +192,6 @@ def item_attributes("item_group_id": item_group_id(item),"availability": item_availability(item),"google_product_category": item_google_product_category(item, category_paths),- "link": item_link(item, current_site),}image_link = item_image_link(item, current_site)diff --git a/tests/test_data_feeds.py b/tests/test_data_feeds.pyindex 4469d25de7..45f2a36a4c 100644--- a/tests/test_data_feeds.py+++ b/tests/test_data_feeds.py@@ -1,6 +1,6 @@import csvfrom io import StringIO-from unittest.mock import Mock, patch+from unittest.mock import Mockfrom django.utils.encoding import smart_text@@ -70,7 +70,6 @@ def test_write_feed(product, monkeypatch):google_required_fields = ["id","title",- "link","image_link","availability","price",@@ -78,11 +77,3 @@ def test_write_feed(product, monkeypatch):]for field in google_required_fields:assert field in header---@patch("saleor.data_feeds.google_merchant.item_link")-def test_feed_contains_site_settings_domain(mocked_item_link, product, site_settings):- write_feed(StringIO())- mocked_item_link.assert_called_once_with(- product.variants.first(), site_settings.site- )