Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Test sales in order
Mira405ff6da240a
diff --git a/tests/test_order.py b/tests/test_order.pyindex 535a215b26..1ccd0937e7 100644--- a/tests/test_order.py+++ b/tests/test_order.py@@ -67,3 +67,11 @@ def test_dashboard_change_quantity_form(request_cart_with_item, order):assert form.is_valid()form.save()assert group.items.get().stock.quantity_allocated == 1+++def test_order_discount(sale, order, request_cart_with_item):+ cart = request_cart_with_item+ group = models.DeliveryGroup.objects.create(order=order)+ group.add_items_from_partition(cart.lines.all())+ item = group.items.first()+ assert item.get_total() == Price(currency="USD", net=5)