New tests fail on python 3.x because read() returns bytes and the test checks for...
authorMichael Komitee <mkomitee@gmail.com>
Thu, 14 Feb 2013 03:42:56 +0000 (22:42 -0500)
committerMichael Komitee <mkomitee@gmail.com>
Thu, 14 Feb 2013 03:42:56 +0000 (22:42 -0500)
test_requests.py

index f6f5531..a9230b1 100644 (file)
@@ -178,10 +178,10 @@ class RequestsTestCase(unittest.TestCase):
         url = httpbin('digest-auth', 'auth', 'user', 'pass')
 
         r = requests.get(url, auth=auth, stream=True)
-        self.assertNotEqual(r.raw.read(), '')
+        self.assertNotEqual(str(r.raw.read()), str(''))
 
         r = requests.get(url, auth=auth, stream=False)
-        self.assertEqual(r.raw.read(), '')
+        self.assertEqual(str(r.raw.read()), str(''))
 
 
     def test_DIGESTAUTH_WRONG_HTTP_401_GET(self):