simplify bin-file test

This commit is contained in:
Manuel Riel 2014-10-08 01:29:53 +02:00
parent 0e95bd9eda
commit 67f2322a8c

View File

@ -91,7 +91,8 @@ class FilesTest(NotebookTestBase):
r = requests.get(url_path_join(base, 'files', 'test.bin'))
self.assertEqual(r.status_code, 200)
self.assertEqual(r.headers['content-type'], 'application/octet-stream')
self.assertTrue(r.content[0] == 255 or r.content[0] == b'\xff')
# self.assertTrue(r.content[0] == 255 or r.content[0] == b'\xff')
self.assertEqual(r.content[:1], b'\xff')
self.assertEqual(len(r.content), 6)
r = requests.get(url_path_join(base, 'files', 'test.txt'))