diff options
| author | Xavier Morel <xmo@odoo.com> | 2019-05-13 12:31:37 +0000 |
|---|---|---|
| committer | Olivier Dony <odo@odoo.com> | 2020-08-14 21:20:47 +0000 |
| commit | 950d962d95d214bdd1bdd64d8771af96d4d618cf (patch) | |
| tree | ad71faa07eed5dd29bd9abfb41e552a20da3c363 /odoo/tests | |
| parent | d21420d87ad8a269a0f30b3d9c0a3cee8c46cb14 (diff) | |
[IMP] core: add env to various auth methods
Allows accessing various keys, especially whether this is an
interactive login or not.
Also have the xml-rpc `login` delegate to `authenticate` instead of
having its own half-assed implementation.
And remove some dead code: as far as I can tell, Session.authenticate
is never called with a uid.
Diffstat (limited to 'odoo/tests')
| -rw-r--r-- | odoo/tests/common.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 191f25003a3..71418c5cc2f 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -1319,12 +1319,9 @@ class HttpCaseCommon(BaseCase): return db = get_db_name() - uid = self.registry['res.users'].authenticate(db, user, password, None) + uid = self.registry['res.users'].authenticate(db, user, password, {'interactive': False}) env = api.Environment(self.cr, uid, {}) - # self.session.authenticate(db, user, password, uid=uid) - # OpenERPSession.authenticate accesses the current request, which we - # don't have, so reimplement it manually... session = self.session session.db = db |
