Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add test for create_history_entry method
akjanika9e175fdc928
diff --git a/tests/test_order.py b/tests/test_order.pyindex e97cdde340..8f0117991e 100644--- a/tests/test_order.py+++ b/tests/test_order.py@@ -142,3 +142,11 @@ def test_add_note_to_order(order_with_lines_and_stock):note_form.is_valid()note_form.save()assert order.notes.first().content == 'test_note'+++def test_create_order_history(order_with_lines):+ order = order_with_lines+ order.create_history_entry(content='test_entry')+ history_entry = models.OrderHistoryEntry.objects.get(order=order)+ assert history_entry == order.history.first()+ assert history_entry.content == 'test_entry'