summaryrefslogtreecommitdiff
path: root/odoo/tests
diff options
context:
space:
mode:
authorHolger Brunn <hbrunn@therp.nl>2019-08-17 13:29:37 +0000
committerHolger Brunn <hbrunn@therp.nl>2019-08-19 07:29:44 +0000
commit024d7ebaa04bb39c213d3a54a0695477ad6accae (patch)
treeabb8ce02d5f557bdbfcd4e2bc1cafca524cd8bcc /odoo/tests
parentd5072c2ec6d90c5760ab9ef44bee265b96970523 (diff)
[FIX] tests: wait for chrome's cookie to be set
In some cases, the first request of a test is made before the proper setting of the cookie. In that case, Odoo picks a new session, leaving the request unauthenticated. closes odoo/odoo#35780 Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Diffstat (limited to 'odoo/tests')
-rw-r--r--odoo/tests/common.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/odoo/tests/common.py b/odoo/tests/common.py
index 6fcd68c427c..df7284931f0 100644
--- a/odoo/tests/common.py
+++ b/odoo/tests/common.py
@@ -708,7 +708,8 @@ class ChromeBrowser():
def set_cookie(self, name, value, path, domain):
params = {'name': name, 'value': value, 'path': path, 'domain': domain}
- self._websocket_send('Network.setCookie', params=params)
+ _id = self._websocket_send('Network.setCookie', params=params)
+ return self._websocket_wait_id(_id)
def _wait_ready(self, ready_code, timeout=60):
self._logger.info('Evaluate ready code "%s"', ready_code)