Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Use already established fixture
Adam Janikba9f63b1bceb
diff --git a/tests/conftest.py b/tests/conftest.pyindex f2f592fd88..027a0c1797 100644--- a/tests/conftest.py+++ b/tests/conftest.py@@ -642,16 +642,3 @@ def closed_orders(billing_address):def collection(db):collection = Collection.objects.create(name='Collection', slug='collection')return collection---def product(product_type, default_category):- product_attr = product_type.product_attributes.first()- attr_value = product_attr.values.first()- attributes = {smart_text(product_attr.pk): smart_text(attr_value.pk)}-- product = Product.objects.create(- name='Test product 1', price=Decimal('10.00'),- product_type=product_type, attributes=attributes, is_published=True,- category=default_category)- return productdiff --git a/tests/test_product.py b/tests/test_product.pyindex 8d4e7c3f4b..269e9c6e2b 100644--- a/tests/test_product.py+++ b/tests/test_product.py@@ -519,9 +519,10 @@ def test_render_product_page_with_no_variant(def test_include_products_from_subcategories_in_main_view(- default_category, product, authorized_client):+ default_category, product_in_stock, authorized_client):subcategory = Category.objects.create(name='sub', slug='test', parent=default_category)+ product = product_in_stockproduct.category = subcategoryproduct.save()path = default_category.get_full_path()