summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCuidight Heach <cuidighth@gmail.com>2013-03-10 20:59:00 +0200
committerCuidight Heach <cuidighth@gmail.com>2013-03-10 20:59:00 +0200
commitdc8533aad4d432817b52f158804f0b6a81fab374 (patch)
treeb3a30aa7787feebd977225a01cde31a2838e8103
parent3ac0b98a980a930ec9e6a6d4d364eb8af505a77c (diff)
downloadpyramid-dc8533aad4d432817b52f158804f0b6a81fab374.tar.gz
pyramid-dc8533aad4d432817b52f158804f0b6a81fab374.tar.bz2
pyramid-dc8533aad4d432817b52f158804f0b6a81fab374.zip
Switched to bytes
-rw-r--r--pyramid/tests/test_authentication.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyramid/tests/test_authentication.py b/pyramid/tests/test_authentication.py
index e696a5754..97b2b1a7c 100644
--- a/pyramid/tests/test_authentication.py
+++ b/pyramid/tests/test_authentication.py
@@ -1290,12 +1290,12 @@ class TestBasicAuthAuthenticationPolicy(unittest.TestCase):
def test_authenticated_userid_utf8(self):
import base64
request = testing.DummyRequest()
- inputs = 'm\xc3\xb6rk\xc3\xb6:m\xc3\xb6rk\xc3\xb6password'.decode('utf-8')
+ inputs = b'm\xc3\xb6rk\xc3\xb6:m\xc3\xb6rk\xc3\xb6password'.decode('utf-8')
request.headers['Authorization'] = 'Basic %s' % base64.b64encode(inputs.encode('utf-8'))
def check(username, password, request):
return []
policy = self._makeOne(check)
- self.assertEqual(policy.authenticated_userid(request), 'm\xc3\xb6rk\xc3\xb6'.decode('utf-8'))
+ self.assertEqual(policy.authenticated_userid(request), b'm\xc3\xb6rk\xc3\xb6'.decode('utf-8'))
def test_unauthenticated_userid_invalid_payload(self):
import base64