From daebd1bd275a398d42cc4dbfe5c6399c7fe3b3a0 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sun, 20 Sep 2015 20:35:45 +0200 Subject: python3++ --- test/http/test_authentication.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test/http') diff --git a/test/http/test_authentication.py b/test/http/test_authentication.py index ee192dd7..a2aa774a 100644 --- a/test/http/test_authentication.py +++ b/test/http/test_authentication.py @@ -11,7 +11,7 @@ def test_parse_http_basic_auth(): ) == vals assert not authentication.parse_http_basic_auth("") assert not authentication.parse_http_basic_auth("foo bar") - v = "basic " + binascii.b2a_base64("foo") + v = b"basic " + binascii.b2a_base64(b"foo") assert not authentication.parse_http_basic_auth(v) @@ -34,7 +34,7 @@ class TestPassManHtpasswd: def test_simple(self): pm = authentication.PassManHtpasswd(tutils.test_data.path("data/htpasswd")) - vals = ("basic", "test", "test") + vals = (b"basic", b"test", b"test") authentication.assemble_http_basic_auth(*vals) assert pm.test("test", "test") assert not pm.test("test", "foo") @@ -73,7 +73,7 @@ class TestBasicProxyAuth: ba = authentication.BasicProxyAuth(authentication.PassManNonAnon(), "test") headers = Headers() - vals = ("basic", "foo", "bar") + vals = (b"basic", b"foo", b"bar") headers[ba.AUTH_HEADER] = authentication.assemble_http_basic_auth(*vals) assert ba.authenticate(headers) @@ -86,12 +86,12 @@ class TestBasicProxyAuth: headers[ba.AUTH_HEADER] = "foo" assert not ba.authenticate(headers) - vals = ("foo", "foo", "bar") + vals = (b"foo", b"foo", b"bar") headers[ba.AUTH_HEADER] = authentication.assemble_http_basic_auth(*vals) assert not ba.authenticate(headers) ba = authentication.BasicProxyAuth(authentication.PassMan(), "test") - vals = ("basic", "foo", "bar") + vals = (b"basic", b"foo", b"bar") headers[ba.AUTH_HEADER] = authentication.assemble_http_basic_auth(*vals) assert not ba.authenticate(headers) -- cgit v1.2.3