diff options
| author | Raphael Collet <rco@openerp.com> | 2011-12-01 17:05:17 +0100 |
|---|---|---|
| committer | Raphael Collet <rco@openerp.com> | 2011-12-01 17:05:17 +0100 |
| commit | 83b67082607dc08042de516c19fbdd43cc4e4151 (patch) | |
| tree | 5532638c5c9f22f0d03eb7f9977e01abc3450de9 /openerp/modules/loading.py | |
| parent | 06e9cc9fb5fddd8cf633f98b926fce0294ad19f4 (diff) | |
| parent | 298add20ca44bc193c6ad39f96cc26183897251a (diff) | |
[MERGE] prevent sending emails in test mode
bzr revid: rco@openerp.com-20111201160517-1gk7sita6c5uernx
Diffstat (limited to 'openerp/modules/loading.py')
| -rw-r--r-- | openerp/modules/loading.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/openerp/modules/loading.py b/openerp/modules/loading.py index 00948bc690e..1ea0bdb7105 100644 --- a/openerp/modules/loading.py +++ b/openerp/modules/loading.py @@ -31,6 +31,7 @@ import logging import os import re import sys +import threading import zipfile import zipimport @@ -97,11 +98,13 @@ def load_module_graph(cr, graph, status=None, perform_checks=True, skip_modules= cr.commit() if not tools.config.options['test_disable']: try: + threading.currentThread().testing = True _load_data(cr, module_name, idref, mode, 'test') except Exception, e: logging.getLogger('init.test').exception( 'Tests failed to execute in module %s', module_name) finally: + threading.currentThread().testing = False if tools.config.options['test_commit']: cr.commit() else: |
