Fix some tests I broke. (More to follow.)

This commit is contained in:
Guido van Rossum 2007-08-27 21:47:52 +00:00
parent 1f2ca56e29
commit 98b349f8e6
3 changed files with 17 additions and 4 deletions

View file

@ -998,7 +998,7 @@ class HandlerTests(unittest.TestCase):
# expect one request without authorization, then one with
self.assertEqual(len(http_handler.requests), 2)
self.assertFalse(http_handler.requests[0].has_header(auth_header))
userpass = '%s:%s' % (user, password)
userpass = bytes('%s:%s' % (user, password), "ascii")
auth_hdr_value = 'Basic ' + str(base64.encodestring(userpass)).strip()
self.assertEqual(http_handler.requests[1].get_header(auth_header),
auth_hdr_value)