Пример #1
0
 def test_verify_false_checksum(self):
     """Verify checksums fail."""
     for d in self.data:
         stream, checksum = d[3][:-1], ord(d[3][-1])
         stream += [chr(checksum + 1)]
         self.assertFalse(Package.verify_checksum(stream))
Пример #2
0
 def test_verify_checksum(self):
     """Verify checksum sucessfully."""
     for d in self.data:
         stream = d[3]
         self.assertTrue(Package.verify_checksum(stream))