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))
def test_verify_checksum(self): """Verify checksum sucessfully.""" for d in self.data: stream = d[3] self.assertTrue(Package.verify_checksum(stream))