projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2275ab5
)
[FIX] must manage() Environment before loading test file
author
Christophe Simonis
<chs@odoo.com>
Wed, 3 Dec 2014 13:48:54 +0000
(14:48 +0100)
committer
Christophe Simonis
<chs@odoo.com>
Wed, 3 Dec 2014 13:48:54 +0000
(14:48 +0100)
openerp/service/server.py
patch
|
blob
|
history
diff --git
a/openerp/service/server.py
b/openerp/service/server.py
index
5ea05df
..
43f9aad
100644
(file)
--- a/
openerp/service/server.py
+++ b/
openerp/service/server.py
@@
-907,10
+907,11
@@
def preload_registries(dbnames):
# run test_file if provided
if test_file:
_logger.info('loading test file %s', test_file)
# run test_file if provided
if test_file:
_logger.info('loading test file %s', test_file)
- if test_file.endswith('yml'):
- load_test_file_yml(registry, test_file)
- elif test_file.endswith('py'):
- load_test_file_py(registry, test_file)
+ with openerp.api.Environment.manage():
+ if test_file.endswith('yml'):
+ load_test_file_yml(registry, test_file)
+ elif test_file.endswith('py'):
+ load_test_file_py(registry, test_file)
if registry._assertion_report.failures:
rc += 1
if registry._assertion_report.failures:
rc += 1