Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Rename pytest.fixture "product_with_two_variants"
Mateusz Dereniowski5000c1d59328
diff --git a/tests/api/benchmark/test_variant.py b/tests/api/benchmark/test_variant.pyindex c23a3b26fb..600cbf6c7f 100644--- a/tests/api/benchmark/test_variant.py+++ b/tests/api/benchmark/test_variant.py@@ -75,7 +75,7 @@ def test_retrieve_variant_list(product_variant_list, api_client, count_queries):@pytest.mark.count_queries(autouse=False)def test_product_variant_bulk_create(staff_api_client,- product_with_two_variants,+ product_with_variant_with_two_attributes,permission_manage_products,color_attribute,size_attribute,@@ -100,7 +100,7 @@ def test_product_variant_bulk_create(}}"""- product = product_with_two_variants+ product = product_with_variant_with_two_attributesproduct_variant_count = ProductVariant.objects.count()product_id = graphene.Node.to_global_id("Product", product.pk)color_attribute_id = graphene.Node.to_global_id("Attribute", color_attribute.id)diff --git a/tests/api/test_variant.py b/tests/api/test_variant.pyindex 7daed98be8..b0f15bb6a7 100644--- a/tests/api/test_variant.py+++ b/tests/api/test_variant.py@@ -211,7 +211,7 @@ def test_create_product_variant_not_all_attributes(def test_create_product_variant_duplicated_attributes(staff_api_client,- product_with_two_variants,+ product_with_variant_with_two_attributes,color_attribute,size_attribute,permission_manage_products,@@ -236,7 +236,7 @@ def test_create_product_variant_duplicated_attributes(}}"""- product = product_with_two_variants+ product = product_with_variant_with_two_attributesproduct_id = graphene.Node.to_global_id("Product", product.pk)color_attribute_id = graphene.Node.to_global_id("Attribute", color_attribute.id)size_attribute_id = graphene.Node.to_global_id("Attribute", size_attribute.id)@@ -1113,12 +1113,12 @@ def test_product_variant_bulk_create_many_errors(def test_product_variant_bulk_create_two_variants_duplicated_attribute_value(staff_api_client,- product_with_two_variants,+ product_with_variant_with_two_attributes,color_attribute,size_attribute,permission_manage_products,):- product = product_with_two_variants+ product = product_with_variant_with_two_attributesproduct_variant_count = ProductVariant.objects.count()product_id = graphene.Node.to_global_id("Product", product.pk)color_attribute_id = graphene.Node.to_global_id("Attribute", color_attribute.id)@@ -1149,12 +1149,12 @@ def test_product_variant_bulk_create_two_variants_duplicated_attribute_value(def test_product_variant_bulk_create_two_variants_duplicated_attribute_value_in_input(staff_api_client,- product_with_two_variants,+ product_with_variant_with_two_attributes,permission_manage_products,color_attribute,size_attribute,):- product = product_with_two_variants+ product = product_with_variant_with_two_attributesproduct_id = graphene.Node.to_global_id("Product", product.pk)product_variant_count = ProductVariant.objects.count()color_attribute_id = graphene.Node.to_global_id("Attribute", color_attribute.id)@@ -1184,12 +1184,12 @@ def test_product_variant_bulk_create_two_variants_duplicated_attribute_value_in_def test_product_variant_bulk_create_two_variants_duplicated_one_attribute_value(staff_api_client,- product_with_two_variants,+ product_with_variant_with_two_attributes,color_attribute,size_attribute,permission_manage_products,):- product = product_with_two_variants+ product = product_with_variant_with_two_attributesproduct_variant_count = ProductVariant.objects.count()product_id = graphene.Node.to_global_id("Product", product.pk)color_attribute_id = graphene.Node.to_global_id("Attribute", color_attribute.id)diff --git a/tests/conftest.py b/tests/conftest.pyindex 32e08e3964..0725ed5f06 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -610,7 +610,7 @@ def product(product_type, category):@pytest.fixture-def product_with_two_variants(color_attribute, size_attribute, category):+def product_with_variant_with_two_attributes(color_attribute, size_attribute, category):product_type = ProductType.objects.create(name="Type with two variants", has_variants=True, is_shipping_required=True)