[Tests] Fix UnicodeWarning for gzipped file comparison

This commit is contained in:
Calum Lind 2018-07-30 09:46:04 +01:00
parent 5959a24d4c
commit 5c4cbf58c5

View File

@ -242,7 +242,10 @@ class DownloadFileTestCase(unittest.TestCase):
def test_download_with_gzip_encoding_disabled(self):
url = self.get_url('gzip?msg=fail')
d = download_file(url, fname('gzip_encoded'), allow_compression=False)
d.addCallback(self.assertNotContains, 'fail', file_mode='rb')
def cb(result):
print(result)
d.addCallback(self.assertNotContains, b'fail', file_mode='rb')
return d
def test_page_redirect_unhandled(self):