Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix tests
Tomasz Szymanskied3b0c1753a9
diff --git a/saleor/order/tests/test_order.py b/saleor/order/tests/test_order.pyindex aba8a74650..8953566b38 100644--- a/saleor/order/tests/test_order.py+++ b/saleor/order/tests/test_order.py@@ -560,7 +560,7 @@ def test_order_weight_add_new_variant(order_with_lines, product):def test_order_weight_change_line_quantity(staff_user, order_with_lines):context_mock = Mock(user=staff_user)- context_mock.plugins.order_line_updated.return_value = None+ context_mock.plugins.calculate_order_line_unit.return_value = Noneline = order_with_lines.lines.first()new_quantity = line.quantity + 2change_order_line_quantity(context_mock, line, new_quantity, line.quantity)@@ -572,7 +572,7 @@ def test_order_weight_change_line_quantity(staff_user, order_with_lines):def test_order_weight_delete_line(order_with_lines):context_mock = Mock()- context_mock.plugins.order_line_updated.return_value = None+ context_mock.plugins.calculate_order_line_unit.return_value = Noneline = order_with_lines.lines.first()delete_order_line(context_mock, line)assert order_with_lines.weight == _calculate_order_weight_from_lines(@@ -855,7 +855,7 @@ def test_category_voucher_checkout_discount_raises_not_applicable(def test_ordered_item_change_quantity(staff_user, transactional_db, order_with_lines):context_mock = Mock(user=staff_user)- context_mock.plugins.order_line_updated.return_value = None+ context_mock.plugins.calculate_order_line_unit.return_value = Noneassert not order_with_lines.events.count()lines = order_with_lines.lines.all()change_order_line_quantity(context_mock, lines[1], lines[1].quantity, 0)@@ -867,7 +867,7 @@ def test_change_order_line_quantity_changes_total_prices(staff_user, transactional_db, order_with_lines):context_mock = Mock(user=staff_user)- context_mock.plugins.order_line_updated.return_value = None+ context_mock.plugins.calculate_order_line_unit.return_value = Noneassert not order_with_lines.events.count()line = order_with_lines.lines.all()[0]new_quantity = line.quantity + 1diff --git a/saleor/order/tests/test_order_utils.py b/saleor/order/tests/test_order_utils.pyindex 028ae20265..7b0e8042da 100644--- a/saleor/order/tests/test_order_utils.py+++ b/saleor/order/tests/test_order_utils.py@@ -27,7 +27,7 @@ def test_change_quantity_generates_proper_event(staff_user,):context_mock = Mock(user=staff_user)- context_mock.plugins.order_line_updated.return_value = None+ context_mock.plugins.calculate_order_line_unit.return_value = Noneassert not OrderEvent.objects.exists()order_with_lines.status = status