Skip to content

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

Remove tests for remove is_publish validation before save product

IKarbowiak5ecf9b8c7483
diff --git a/tests/conftest.py b/tests/conftest.py
index 61ad33ef2d..3372d69071 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -635,6 +635,7 @@ def product_without_shipping(category):
@pytest.fixture
def product_without_category(product):
product.category = None
+ product.is_published = False
product.save()
return product
diff --git a/tests/test_product.py b/tests/test_product.py
index b581521fc2..7877c44d74 100644
--- a/tests/test_product.py
+++ b/tests/test_product.py
@@ -1005,52 +1005,3 @@ def test_costs_get_margin_for_variant(variant, price, cost):
variant.cost_price = cost
variant.price_override = price
assert not get_margin_for_variant(variant)
-
-
-def test_save_product_without_category_and_true_is_published_value(product_type):
- product = Product(
- name="Test product",
- product_type=product_type,
- price=Money("15.00", "USD"),
- is_published=True,
- )
-
- product.save()
-
- assert not product.is_published
-
-
-def test_save_product_with_category_and_true_is_published_value(product_type, category):
- product = Product(
- name="Test product",
- product_type=product_type,
- category=category,
- price=Money("15.00", "USD"),
- is_published=True,
- )
-
- product.save()
- assert product.is_published
-
-
-def test_publish_product_without_category(product_without_category):
- product_without_category.is_published = True
-
- product_without_category.save()
-
- assert not product_without_category.is_published
-
-
-def test_publish_product_with_category(product_type, category):
- product = Product.objects.create(
- name="Test product",
- product_type=product_type,
- category=category,
- price=Money("15.00", "USD"),
- is_published=False,
- )
- product.is_published = True
-
- product.save()
-
- assert product.is_published