From c8ac425d7bc17b7f3e366dec919d3fdb05624594 Mon Sep 17 00:00:00 2001 From: duongtq Date: Mon, 11 Sep 2023 17:28:48 +0700 Subject: [PATCH] [FIX] base_edifact: Fix test and depend on edi_party_data_oca module --- base_edifact/__manifest__.py | 2 +- base_edifact/tests/test_base_edifact.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/base_edifact/__manifest__.py b/base_edifact/__manifest__.py index 3f1dcf134f..04b684a759 100644 --- a/base_edifact/__manifest__.py +++ b/base_edifact/__manifest__.py @@ -19,7 +19,7 @@ "bin": [], }, "depends": [ - # "edi_party_data_oca" + "edi_party_data_oca", # for configuration "account", "partner_identification", diff --git a/base_edifact/tests/test_base_edifact.py b/base_edifact/tests/test_base_edifact.py index 1eb3614d6c..b2932da553 100644 --- a/base_edifact/tests/test_base_edifact.py +++ b/base_edifact/tests/test_base_edifact.py @@ -31,7 +31,8 @@ def tearDown(self): def test_pydifact_obj(self): edifact_docu = _get_file_content("Retail_EDIFACT_ORDERS_sample1.txt") obj = self.base_edifact_model.pydifact_obj(edifact_docu) - self.assertEqual(obj["order"]["order_ref"], "1AA1TEST") + # [1]: to get the list messages, [0]: to get the first list value of the segments + self.assertEqual(obj[1]["segments"][0]["BGM"][1], "1AA1TEST") def test_map2odoo_address(self): """Address segment