From 52250700f7d99446c8c3b08f55f4728f42b73dae Mon Sep 17 00:00:00 2001 From: Graeme Gellatly Date: Mon, 29 Jun 2015 17:43:17 +1200 Subject: [PATCH] Update Tests to Correctly Get DB Fix introduced flake 8 errors --- auth_from_http_remote_user/tests/test_res_users.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/auth_from_http_remote_user/tests/test_res_users.py b/auth_from_http_remote_user/tests/test_res_users.py index 43d5481c6..0878babed 100644 --- a/auth_from_http_remote_user/tests/test_res_users.py +++ b/auth_from_http_remote_user/tests/test_res_users.py @@ -45,11 +45,13 @@ class test_res_users(common.TransactionCase): def test_login(self): res_users_obj = self.registry('res.users') - res = res_users_obj.authenticate(common.DB, 'admin', 'admin', None) + res = res_users_obj.authenticate( + common.get_db_name(), 'admin', 'admin', None) uid = res self.assertTrue(res, "Basic login must works as expected") token = "123456" - res = res_users_obj.authenticate(common.DB, 'admin', token, None) + res = res_users_obj.authenticate( + common.get_db_name(), 'admin', token, None) self.assertFalse(res) # mimic what the new controller do when it find a value in # the http header (HTTP_REMODE_USER) @@ -60,10 +62,11 @@ class test_res_users(common.TransactionCase): with mock_cursor(self.cr): # We can verifies that the given (uid, token) is authorized for # the database - res_users_obj.check(common.DB, uid, token) + res_users_obj.check(common.get_db_name(), uid, token) # we are able to login with the new token - res = res_users_obj.authenticate(common.DB, 'admin', token, None) + res = res_users_obj.authenticate( + common.get_db_name(), 'admin', token, None) self.assertTrue(res) @unittest.skipIf(os.environ.get('TRAVIS'),