diff options
author | Jelle van der Waa <jelle@vdwaa.nl> | 2018-04-22 21:04:11 +0200 |
---|---|---|
committer | Jelle van der Waa <jelle@vdwaa.nl> | 2019-01-21 21:19:58 +0100 |
commit | e8db6e68a5b7f5eae3919f7b928bf521d7931d9f (patch) | |
tree | 79e58a140e2935d16479ad761d816cd2accc45ca /mirrors | |
parent | 337af5719265f7b0c946b74e01d285afa12d9aec (diff) | |
download | archweb-e8db6e68a5b7f5eae3919f7b928bf521d7931d9f.tar.gz archweb-e8db6e68a5b7f5eae3919f7b928bf521d7931d9f.zip |
mirrors.tests: convert response.content to str
Diffstat (limited to 'mirrors')
-rw-r--r-- | mirrors/tests/test_mirrorlist.py | 8 |
1 files changed, 4 insertions, 4 deletions
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() |