Commit df633de2 authored by Jérome Perrin's avatar Jérome Perrin

access_token: py3

parent 517a4201
...@@ -441,7 +441,7 @@ class TestERP5DumbHTTPExtractionPlugin(AccessTokenTestCase): ...@@ -441,7 +441,7 @@ class TestERP5DumbHTTPExtractionPlugin(AccessTokenTestCase):
return HTTPRequest(StringIO(), env, HTTPResponse()) return HTTPRequest(StringIO(), env, HTTPResponse())
def test_working_authentication(self): def test_working_authentication(self):
request = self.do_fake_request("GET", {"HTTP_AUTHORIZATION": b"Basic " + base64.b64encode(b"login:password")}) request = self.do_fake_request("GET", {"HTTP_AUTHORIZATION": "Basic " + base64.b64encode(b"login:password").decode()})
ret = ERP5DumbHTTPExtractionPlugin("default_extraction").extractCredentials(request) ret = ERP5DumbHTTPExtractionPlugin("default_extraction").extractCredentials(request)
self.assertEqual(ret, {'login': 'login', 'password': 'password', 'remote_host': 'bobo.remote.host', 'remote_address': '204.183.226.81 '}) self.assertEqual(ret, {'login': 'login', 'password': 'password', 'remote_host': 'bobo.remote.host', 'remote_address': '204.183.226.81 '})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment