Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add item_tax method test on data feeeds

Gabriel L Martinezadbb0d7c0889
diff --git a/saleor/data_feeds/tests/test_data_feeds.py b/saleor/data_feeds/tests/test_data_feeds.py
index 932d2fd8ef..ab061cd5c7 100644
--- a/saleor/data_feeds/tests/test_data_feeds.py
+++ b/saleor/data_feeds/tests/test_data_feeds.py
@@ -11,6 +11,7 @@ from ..google_merchant import (
item_attributes,
item_availability,
item_google_product_category,
+ item_tax,
write_feed,
)
@@ -40,7 +41,6 @@ def test_saleor_feed_items(product, site_settings):
)
assert attributes.get("mpn") == valid_variant.sku
assert attributes.get("availability") == "in stock"
- assert attributes.get("tax") == "US::0:yes"
def test_saleor_get_feed_items_having_no_stock_info(variant, site_settings):
@@ -59,6 +59,12 @@ def test_category_formatter(db):
assert item_google_product_category(sub_category_item, {}) == "Main > Sub"
+def test_tax_formatter(variant, site_settings):
+ discounts = []
+ is_charge_taxes_on_shipping = charge_taxes_on_shipping()
+ assert item_tax(variant, discounts, is_charge_taxes_on_shipping) == "US::0:yes"
+
+
def test_write_feed(product, monkeypatch):
buffer = StringIO()
write_feed(buffer)