mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-29 11:16:43 +00:00
fix byte range error in test, fixes #1740
This commit is contained in:
parent
64d128cf22
commit
e02d1a66b8
1 changed files with 2 additions and 2 deletions
|
@ -155,7 +155,7 @@ def test_passphrase(self, keys_dir, monkeypatch):
|
|||
|
||||
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 @@ def test_assert_id(self, key):
|
|||
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'
|
||||
|
|
Loading…
Reference in a new issue