[FIX] must manage() Environment before loading test file

This commit is contained in:
Christophe Simonis 2014-12-03 14:48:54 +01:00
parent 2275ab5d95
commit 2e092ace29
1 changed files with 5 additions and 4 deletions

View File

@ -907,6 +907,7 @@ def preload_registries(dbnames):
# run test_file if provided
if test_file:
_logger.info('loading test file %s', test_file)
with openerp.api.Environment.manage():
if test_file.endswith('yml'):
load_test_file_yml(registry, test_file)
elif test_file.endswith('py'):