From d52439d3e44b06061085f96995111441db95b7ac Mon Sep 17 00:00:00 2001 From: geomer198 Date: Mon, 20 Nov 2023 16:18:50 +0400 Subject: [PATCH] [FIX] pos_order_to_sale_order: test is fixed. --- pos_order_to_sale_order/tests/test_module.py | 33 +++++++++++++------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/pos_order_to_sale_order/tests/test_module.py b/pos_order_to_sale_order/tests/test_module.py index 68041cd29f..7a7627b04a 100644 --- a/pos_order_to_sale_order/tests/test_module.py +++ b/pos_order_to_sale_order/tests/test_module.py @@ -37,14 +37,25 @@ def test_pos_order_to_sale_order(self): order = after_orders[-1] - expected_note = "Product Note" - - self.assertEqual(order.amount_total, 5.18) - self.assertEqual(order.state, "sale") - self.assertEqual(order.delivery_status, "full") - self.assertEqual(order.invoice_status, "invoiced") - - line_1, line_2 = order.order_line - - self.assertNotIn(expected_note, line_1.name) - self.assertIn(expected_note, line_2.name) + self.assertEqual( + order.amount_total, 5.18, msg="Total Amount must be equal to 5.18" + ) + self.assertEqual(order.state, "sale", msg="Order state must be equal to 'sale'") + self.assertEqual( + order.delivery_status, "full", msg="Delivery status must be equal to 'full'" + ) + self.assertEqual( + order.invoice_status, + "invoiced", + msg="Invoice status must be equal to 'invoiced'", + ) + self.assertNotIn( + "Product Note", + order.order_line[0].name, + msg="'Product Note' must contains in sale order line description", + ) + self.assertIn( + "Product Note", + order.order_line[1].name, + msg="'Product Note' must not contains in sale order line description", + )