feat: lots of changes
This commit is contained in:
@@ -29,9 +29,15 @@ class ShopModelsTest(TestCase):
|
||||
unit=Product.UnitChoices.UNIT,
|
||||
)
|
||||
|
||||
ProductPrice.objects.create(product=self.potatoes, price=Decimal("0.80"))
|
||||
ProductPrice.objects.create(product=self.gasoline, price=Decimal("1.15"))
|
||||
ProductPrice.objects.create(product=self.usb_c, price=Decimal("9.95"))
|
||||
ProductPrice.objects.create(
|
||||
product=self.potatoes, price=Decimal("0.80"), tax=self.tax
|
||||
)
|
||||
ProductPrice.objects.create(
|
||||
product=self.gasoline, price=Decimal("1.15"), tax=self.tax
|
||||
)
|
||||
ProductPrice.objects.create(
|
||||
product=self.usb_c, price=Decimal("9.95"), tax=self.tax
|
||||
)
|
||||
|
||||
def test_create_order(self):
|
||||
self.customer = Customer.objects.create(
|
||||
@@ -57,19 +63,16 @@ class ShopModelsTest(TestCase):
|
||||
l1 = create_order_line_for_product(
|
||||
self.potatoes,
|
||||
quantity=Decimal("1.5"),
|
||||
tax=self.tax,
|
||||
order=order,
|
||||
)
|
||||
l2 = create_order_line_for_product(
|
||||
self.gasoline,
|
||||
quantity=Decimal("40"),
|
||||
tax=self.tax,
|
||||
order=order,
|
||||
)
|
||||
l3 = create_order_line_for_product(
|
||||
self.usb_c,
|
||||
quantity=Decimal("1.00"),
|
||||
tax=self.tax,
|
||||
order=order,
|
||||
)
|
||||
order.calculate_total_from_lines()
|
||||
|
||||
Reference in New Issue
Block a user