Skip to content

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

Ensure in tests that variant name changes

Adam Janik7e0ccbc4925f
diff --git a/tests/api/test_product.py b/tests/api/test_product.py
index 127a73b7d4..171df00ade 100644
--- a/tests/api/test_product.py
+++ b/tests/api/test_product.py
@@ -1232,6 +1232,9 @@ def test_product_type_update_changes_variant_name(
}
}
"""
+ variant = product.variants.first()
+ variant.name = 'test name'
+ variant.save()
has_variants = True
require_shipping = False
product_type_id = graphene.Node.to_global_id(
@@ -1255,6 +1258,7 @@ def test_product_type_update_changes_variant_name(
attribute = product.product_type.variant_attributes.first()
value = attribute.values.first().name
assert variant.name == value
+ assert not variant.name == 'test name'
def test_update_variants_changed_does_nothing_with_no_attributes():