From e8db6e68a5b7f5eae3919f7b928bf521d7931d9f Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Sun, 22 Apr 2018 21:04:11 +0200 Subject: mirrors.tests: convert response.content to str --- mirrors/tests/test_mirrorlist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mirrors') diff --git a/mirrors/tests/test_mirrorlist.py b/mirrors/tests/test_mirrorlist.py index ab4373e8..db55c446 100644 --- a/mirrors/tests/test_mirrorlist.py +++ b/mirrors/tests/test_mirrorlist.py @@ -27,12 +27,12 @@ class MirrorListTest(TestCase): def test_mirrorlist_all(self): response = self.client.get('/mirrorlist/all/') self.assertEqual(response.status_code, 200) - self.assertIn(self.mirror_url.hostname, response.content) + self.assertIn(self.mirror_url.hostname, response.content.decode()) def test_mirrorlist_all_http(self): response = self.client.get('/mirrorlist/all/http/') self.assertEqual(response.status_code, 200) - self.assertIn(self.mirror_url.hostname, response.content) + self.assertIn(self.mirror_url.hostname, response.content.decode()) def test_mirrorlist_all_https(self): # First test that without any https mirrors, we get a 404. @@ -58,10 +58,10 @@ class MirrorListTest(TestCase): # First test that we correctly see the above mirror. response = self.client.get('/mirrorlist/?country=JP&protocol=https') self.assertEqual(response.status_code, 200) - self.assertIn(jp_mirror_url.hostname, response.content) + self.assertIn(jp_mirror_url.hostname, response.content.decode()) # Now confirm that the US mirror did not show up. - self.assertNotIn(self.mirror_url.hostname, response.content) + self.assertNotIn(self.mirror_url.hostname, response.content.decode()) jp_mirror_url.delete() -- cgit v1.2.3-55-g3dc8