summaryrefslogtreecommitdiff
path: root/addons/test_xlsx_export
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2020-03-06 14:45:21 +0000
committerOlivier Dony <odo@odoo.com>2020-08-14 21:20:47 +0000
commitdccbf425a1742c08564d4f7b223ce27f8746c832 (patch)
tree3a45016eb7a06a00cf41e95f722e0b9c69100a70 /addons/test_xlsx_export
parent950d962d95d214bdd1bdd64d8771af96d4d618cf (diff)
[FIX] core: ensure we create a new session for each tour
The browser itself would get mostly cleaned up between tours, but the session object would not get cleaned, and apparently in some cases that could lead to an incoherent session: a tour would add data to the session which the next tour (logging in as a different user) would not (fully) override, leading to a session inconsistency and a Session Expired exception during the tour. Fix by not storing the session on the test object, the session is created during authentication then set on the opener & browser.
Diffstat (limited to 'addons/test_xlsx_export')
-rw-r--r--addons/test_xlsx_export/tests/test_export.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/test_xlsx_export/tests/test_export.py b/addons/test_xlsx_export/tests/test_export.py
index df0f85a5a4c..5ba8c0a0de5 100644
--- a/addons/test_xlsx_export/tests/test_export.py
+++ b/addons/test_xlsx_export/tests/test_export.py
@@ -22,8 +22,8 @@ class XlsxCreatorCase(common.HttpCase):
super().setUp()
self.model = self.env[self.model_name]
- u = mail_new_test_user(self.env, login='fof', password='123456789', groups='base.group_user,base.group_allow_export')
- self.authenticate('fof', '123456789')
+ mail_new_test_user(self.env, login='fof', password='123456789', groups='base.group_user,base.group_allow_export')
+ self.session = self.authenticate('fof', '123456789')
self.worksheet = {} # mock worksheet