From 8ea533585bce85c1d84dfeabd803b44f349c5ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 12 Mar 2010 12:21:58 +0100 Subject: [PATCH] Better management of cursor in install_module test --- trytond/tests/test_tryton.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/trytond/tests/test_tryton.py b/trytond/tests/test_tryton.py index 5f638ae3bd..d9a5834536 100644 --- a/trytond/tests/test_tryton.py +++ b/trytond/tests/test_tryton.py @@ -105,7 +105,6 @@ def install_module(name): cursor = database.cursor() if DB_NAME not in database.list(cursor): create(DB_NAME, 'admin', 'en_US', CONFIG['admin_passwd']) - cursor.commit() cursor.close() cursor = DB.cursor() module_obj = POOL.get('ir.module.module') @@ -119,12 +118,14 @@ def install_module(name): return module_obj.button_install(cursor, USER, module_ids, CONTEXT) + cursor.commit() install_upgrade_obj = POOL.get('ir.module.module.install_upgrade', type='wizard') wiz_id = install_upgrade_obj.create(cursor, USER) cursor.commit() install_upgrade_obj.execute(cursor, USER, wiz_id, {}, 'start', CONTEXT) + cursor.commit() install_upgrade_obj.delete(cursor, USER, wiz_id) cursor.commit() cursor.close()