Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Move tests
michalc88f077eed06
diff --git a/tests/dashboard/test_order.py b/tests/dashboard/test_order.pyindex 4f2e1abc02..764de86bd8 100644--- a/tests/dashboard/test_order.py+++ b/tests/dashboard/test_order.py@@ -278,6 +278,29 @@ def test_view_split_order_line_with_invalid_data(admin_client, order_with_items_assert DeliveryGroup.objects.count() == 1+def test_ordered_item_change_quantity(transactional_db, order_with_items):+ assert list(order_with_items.history.all()) == []+ items = order_with_items.groups.all()[0].items.all()+ items[0].change_quantity(0)+ items[1].change_quantity(0)+ items[2].change_quantity(0)+ history = list(order_with_items.history.all())+ assert len(history) == 1+ assert history[0].status == 'cancelled'+ assert history[0].comment == 'Order cancelled. No items in order'+++def test_ordered_item_remove_empty_group_with_force(+ transactional_db, order_with_items):+ group = order_with_items.groups.all()[0]+ items = group.items.all()+ OrderedItem.objects.remove_empty_groups(items[0], force=True)+ history = list(order_with_items.history.all())+ assert len(history) == 1+ assert history[0].status == 'cancelled'+ assert history[0].comment == 'Order cancelled. No items in order'++@pytest.mark.integration@pytest.mark.django_dbdef test_view_order_invoice(diff --git a/tests/test_order.py b/tests/test_order.pyindex fa35e7558f..178fe9e71a 100644--- a/tests/test_order.py+++ b/tests/test_order.py@@ -45,26 +45,3 @@ def test_order_discount(sale, order, request_cart_with_item):group, cart.lines.all(), discounts=cart.discounts)item = group.items.first()assert item.get_price_per_item() == Price(currency="USD", net=5)---def test_ordered_item_change_quantity(transactional_db, order_with_items):- assert list(order_with_items.history.all()) == []- items = order_with_items.groups.all()[0].items.all()- items[0].change_quantity(0)- items[1].change_quantity(0)- items[2].change_quantity(0)- history = list(order_with_items.history.all())- assert len(history) == 1- assert history[0].status == 'cancelled'- assert history[0].comment == 'Order cancelled. No items in order'---def test_ordered_item_remove_empty_groupwith_force(- transactional_db, order_with_items):- group = order_with_items.groups.all()[0]- items = group.items.all()- models.OrderedItem.objects.remove_empty_groups(items[0], force=True)- history = list(order_with_items.history.all())- assert len(history) == 1- assert history[0].status == 'cancelled'- assert history[0].comment == 'Order cancelled. No items in order'