From 3c33c2fa24a29f174cbe708df74f83bbc66695da 2013-11-12 23:40:05 From: MinRK Date: 2013-11-12 23:40:05 Subject: [PATCH] use request.text for Python 3 (content is always bytes) --- diff --git a/IPython/html/tests/test_files.py b/IPython/html/tests/test_files.py index 1e0766c..23cc8fa 100644 --- a/IPython/html/tests/test_files.py +++ b/IPython/html/tests/test_files.py @@ -40,7 +40,7 @@ class FilesTest(NotebookTestBase): path = pjoin(nbdir, d.replace('/', os.sep)) r = requests.get(url_path_join(url, 'files', d, 'foo')) r.raise_for_status() - self.assertEqual(r.content, b'foo') + self.assertEqual(r.text, 'foo') r = requests.get(url_path_join(url, 'files', d, '.foo')) self.assertEqual(r.status_code, 403) @@ -71,15 +71,15 @@ class FilesTest(NotebookTestBase): url = url_path_join(base, 'notebooks', prefix, 'files', 'f1.txt') r = requests.get(url) self.assertEqual(r.status_code, 200) - self.assertEqual(r.content, prefix + '/files/f1') + self.assertEqual(r.text, prefix + '/files/f1') url = url_path_join(base, 'notebooks', prefix, 'files', 'f2.txt') r = requests.get(url) self.assertEqual(r.status_code, 200) - self.assertEqual(r.content, prefix + '/files/f2') + self.assertEqual(r.text, prefix + '/files/f2') url = url_path_join(base, 'notebooks', prefix, 'files', 'f3.txt') r = requests.get(url) self.assertEqual(r.status_code, 200) - self.assertEqual(r.content, prefix + '/f3') + self.assertEqual(r.text, prefix + '/f3')