chore: splitted views file into separated files
This commit is contained in:
@@ -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"})
|
||||
|
||||
Reference in New Issue
Block a user