def test_findEncryptedChunks_weird_zeros(self): with open(WEIRD_ZEROS, 'rb') as f: data = f.read() # Just assert that this doesn't raise any exception for not finding the # end of eexec t1Lib.findEncryptedChunks(data)
def test_findEncryptedChunks(self): with open(PFA, "rb") as f: data = f.read() chunks = t1Lib.findEncryptedChunks(data) self.assertEqual(len(chunks), 3) self.assertFalse(chunks[0][0]) # the second chunk is encrypted self.assertTrue(chunks[1][0]) self.assertFalse(chunks[2][0])
def test_findEncryptedChunks(self): with open(PFA, "rb") as f: data = f.read() chunks = t1Lib.findEncryptedChunks(data) self.assertEqual(len(chunks), 3) self.assertFalse(chunks[0][0]) # the second chunk is encrypted self.assertTrue(chunks[1][0]) self.assertFalse(chunks[2][0])