summaryrefslogtreecommitdiff
path: root/addons/website_mail_channel
diff options
context:
space:
mode:
authorChristophe Monniez <moc@odoo.com>2019-10-25 11:27:35 +0000
committerChristophe Monniez <moc@odoo.com>2019-10-30 12:35:23 +0000
commit8d5da6e4be05428f3243f92c0464d3c1f6a43873 (patch)
treea0fdc729641ef638d1edfb3646c463eba28f3697 /addons/website_mail_channel
parentb6ed34e134f868d7ccdfcb436592e0cc343fa3b5 (diff)
[IMP] tests: log a warning when HttpCase test in at_install
When loading a page on an existing starting database, registry is not fully loaded causing potential error when trying to access model existing in database (views, menitem, ...) since model added in last loaded module does not exist in registry. Thus, executing browser js test may lead to errors when executed during an update on a database with other modules installed. HTTPCase should be executed post_install to ensure that registry is fully loaded to avoid this problem. Since HTTPCase are slower than other test, it is also a good idea to execute them at the end, in order to prioritize fast fail. With this commit, a warning is isued if such a test class is tagged to run at install time. While at it, remove deprecated at_install and post_install helpers and remove the deprecated phantom_js alias. closes odoo/odoo#39462 Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Diffstat (limited to 'addons/website_mail_channel')
-rw-r--r--addons/website_mail_channel/tests/test_unsubscribe.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/website_mail_channel/tests/test_unsubscribe.py b/addons/website_mail_channel/tests/test_unsubscribe.py
index 28934d5f49d..8da7bb5b08b 100644
--- a/addons/website_mail_channel/tests/test_unsubscribe.py
+++ b/addons/website_mail_channel/tests/test_unsubscribe.py
@@ -1,9 +1,10 @@
# -*- coding: utf-8 -*-
-from odoo.tests import common
+from odoo.tests import common, tagged
from odoo.tools.misc import mute_logger, ustr
+@tagged('-at_install', 'post_install')
class TestConfirmUnsubscribe(common.HttpCase):
def setUp(self):
super(TestConfirmUnsubscribe, self).setUp()