Skip to content

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

Change calls in test to represent current flow

Maciej Korycinskidf89bc17f2f7
diff --git a/saleor/plugins/avatax/tests/test_avatax.py b/saleor/plugins/avatax/tests/test_avatax.py
index 23330c1c2c..c81eddbc73 100644
--- a/saleor/plugins/avatax/tests/test_avatax.py
+++ b/saleor/plugins/avatax/tests/test_avatax.py
@@ -90,7 +90,7 @@ def test_calculate_checkout_line_total(
site_settings.save()
line = checkout_with_item.lines.first()
product = line.variant.product
- manager.assign_tax_code_to_object_meta(product, None)
+ product.metadata = {}
manager.assign_tax_code_to_object_meta(product.product_type, "PC040156")
product.save()
product.product_type.save()
@@ -147,7 +147,7 @@ def test_calculate_checkout_total_uses_default_calculation(
checkout_with_item.save()
line = checkout_with_item.lines.first()
product = line.variant.product
- manager.assign_tax_code_to_object_meta(product, None)
+ product.metadata = {}
manager.assign_tax_code_to_object_meta(product.product_type, "PC040156")
product.save()
product.product_type.save()
@@ -216,7 +216,7 @@ def test_calculate_checkout_total(
checkout_with_item.save()
line = checkout_with_item.lines.first()
product = line.variant.product
- manager.assign_tax_code_to_object_meta(product, None)
+ product.metadata = {}
manager.assign_tax_code_to_object_meta(product.product_type, "PC040156")
product.save()
product.product_type.save()
diff --git a/saleor/plugins/vatlayer/tests/test_vatlayer.py b/saleor/plugins/vatlayer/tests/test_vatlayer.py
index a3a754176d..2cc19d00af 100644
--- a/saleor/plugins/vatlayer/tests/test_vatlayer.py
+++ b/saleor/plugins/vatlayer/tests/test_vatlayer.py
@@ -442,10 +442,7 @@ def test_apply_taxes_to_product_uses_taxes_from_product_type(
settings.PLUGINS = ["saleor.plugins.vatlayer.plugin.VatlayerPlugin"]
country = Country("PL")
manager = get_plugins_manager()
- variant.product.metadata = {
- "vatlayer.code": None,
- "vatlayer.description": None,
- }
+ variant.product.metadata = {}
variant.product.product_type.metadata = {
"vatlayer.code": "standard",
"vatlayer.description": "standard",