chore: splitted views file into separated files

This commit is contained in:
2024-11-30 13:28:44 +01:00
parent e40cdee31b
commit e6680463ec
12 changed files with 99 additions and 98 deletions
+11 -5
View File
@@ -2,16 +2,22 @@ from decimal import Decimal
from django.test import TestCase
from shop.tests.mixins import CreateProductsMixin
from shop.models import Product
from shop.filters import ProductFilter
from shop.models import Product
from shop.tests.mixins import CreateProductsMixin
class TestProductFilter(TestCase, CreateProductsMixin):
def setUp(self):
product_a = self.create_product(name="producto 1", sku='001', price=Decimal("40.00"))
product_b = self.create_product(name="producto 2", sku='002', price=Decimal("70.00"))
product_c = self.create_product(name="producto 3", sku='003', price=Decimal("100.00"))
product_a = self.create_product(
name="producto 1", sku="001", price=Decimal("40.00")
)
product_b = self.create_product(
name="producto 2", sku="002", price=Decimal("70.00")
)
product_c = self.create_product(
name="producto 3", sku="003", price=Decimal("100.00")
)
def test_product_filter_by_price(self):
f = ProductFilter({"price_gt": "40"})