Merge pull request #1747 from ThomasWaldmann/fix-byte-range-error

fix byte range error in test, fixes #1740
This commit is contained in:
TW 2016-10-20 04:30:29 +02:00 committed by GitHub
commit c8cae9f35d
1 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ class TestKey:
def _corrupt_byte(self, key, data, offset):
data = bytearray(data)
data[offset] += 1
data[offset] ^= 1
with pytest.raises(IntegrityError):
key.decrypt(b'', data)
@ -186,7 +186,7 @@ class TestKey:
id = key.id_hash(plaintext)
key.assert_id(id, plaintext)
id_changed = bytearray(id)
id_changed[0] += 1
id_changed[0] ^= 1
with pytest.raises(IntegrityError):
key.assert_id(id_changed, plaintext)
plaintext_changed = plaintext + b'1'