feat: add reencrypt command
This commit is contained in:
parent
02ca346eae
commit
654d996a53
7 changed files with 60 additions and 6 deletions
16
tests/commands/test_reencrypt.py
Normal file
16
tests/commands/test_reencrypt.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import pytest
|
||||
|
||||
from halig.commands.reencrypt import ReencryptCommand
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def reencrypt_command(settings):
|
||||
return ReencryptCommand(settings)
|
||||
|
||||
|
||||
@pytest.mark.usefixtures('notes')
|
||||
def test_reencrypt(reencrypt_command):
|
||||
reencrypt_command.run()
|
||||
for note_path in reencrypt_command.traverse():
|
||||
with note_path.open("rb") as f:
|
||||
assert reencrypt_command.encryptor.decrypt(f.read()) == b""
|
||||
Loading…
Add table
Add a link
Reference in a new issue