diff options
| author | Christophe Monniez <moc@odoo.com> | 2020-03-19 09:29:27 +0000 |
|---|---|---|
| committer | Christophe Monniez <moc@odoo.com> | 2020-03-19 11:47:41 +0000 |
| commit | 7e1481355f39db4ef2d16ce2417f954337be0897 (patch) | |
| tree | 798686ebe9967a49947f93230792613c370d7fc0 | |
| parent | d0fc2ecfaa56e10ae339cbb9c6ec0a4045f3d499 (diff) | |
[FIX] tests: move post_install only warning into browser_js
This warning should only appear when Chrome is used.
closes odoo/odoo#48009
X-original-commit: 013b32f000520217af17b6e1ffe1872ec97afdf0
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
| -rw-r--r-- | odoo/tests/common.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 15bc0ce1cec..856f6b0e611 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -1208,8 +1208,6 @@ class HttpCase(TransactionCase): def setUp(self): super(HttpCase, self).setUp() - if not self.env.registry.loaded: - self._logger.warning('HttpCase test should be in post_install only') if self.registry_test_mode: self.registry.enter_test_mode(self.cr) self.addCleanup(self.registry.leave_test_mode) @@ -1291,6 +1289,9 @@ class HttpCase(TransactionCase): To signal success test do: console.log('test successful') To signal test failure raise an exception or call console.error """ + if not self.env.registry.loaded: + self._logger.warning('HttpCase test should be in post_install only') + # increase timeout if coverage is running if any(f.filename.endswith('/coverage/execfile.py') for f in inspect.stack() if f.filename): timeout = timeout * 1.5 |
