From cbf090cdb7afd489514b848643b0f1c4d78ca30e Mon Sep 17 00:00:00 2001 From: Sergi Almacellas Abellana Date: Mon, 20 Nov 2017 15:33:22 +0100 Subject: [PATCH] Complete ir_action_window test Test search_value, context_domain and context model are correclty defined issue6880 review43711002 --- trytond/tests/test_tryton.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/trytond/tests/test_tryton.py b/trytond/tests/test_tryton.py index 25ea9fae82..c78a8e697a 100644 --- a/trytond/tests/test_tryton.py +++ b/trytond/tests/test_tryton.py @@ -519,12 +519,20 @@ class ModuleTestCase(unittest.TestCase): domain = decoder.decode(action_window.pyson_domain) order = decoder.decode(action_window.pyson_order) context = decoder.decode(action_window.pyson_context) + search_value = decoder.decode(action_window.pyson_search_value) + if action_window.context_domain: + domain = ['AND', domain, + decoder.decode(action_window.context_domain)] with Transaction().set_context(context): Model.search(domain, order=order, limit=action_window.limit) + if search_value: + Model.search(search_value) for action_domain in action_window.act_window_domains: if not action_domain.domain: continue Model.search(decoder.decode(action_domain.domain)) + if action_window.context_model: + pool.get(action_window.context_model) @with_transaction() def test_modelsingleton_inherit_order(self):