summaryrefslogtreecommitdiff
path: root/odoo/modules/loading.py
diff options
context:
space:
mode:
Diffstat (limited to 'odoo/modules/loading.py')
-rw-r--r--odoo/modules/loading.py20
1 files changed, 9 insertions, 11 deletions
diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py
index 6b924f09bf4..e256711e06f 100644
--- a/odoo/modules/loading.py
+++ b/odoo/modules/loading.py
@@ -246,17 +246,15 @@ def load_module_graph(cr, graph, status=None, perform_checks=True,
# update made to the schema or data so the tests can run
# (separately in their own transaction)
cr.commit()
- if demo_loaded:
- # launch tests only in demo mode, allowing tests to use demo data.
- if tools.config.options['test_enable']:
- # Yamel test
- report.record_result(load_test(idref, mode))
- # Python tests
- env['ir.http']._clear_routing_map() # force routing map to be rebuilt
- report.record_result(odoo.modules.module.run_unit_tests(module_name, cr.dbname))
- # tests may have reset the environment
- env = api.Environment(cr, SUPERUSER_ID, {})
- module = env['ir.module.module'].browse(module_id)
+
+ if tools.config.options['test_enable']:
+ report.record_result(load_test(idref, mode))
+ # Python tests
+ env['ir.http']._clear_routing_map() # force routing map to be rebuilt
+ report.record_result(odoo.modules.module.run_unit_tests(module_name, cr.dbname))
+ # tests may have reset the environment
+ env = api.Environment(cr, SUPERUSER_ID, {})
+ module = env['ir.module.module'].browse(module_id)
processed_modules.append(package.name)