feat: add reencrypt command

This commit is contained in:
cătălin 2023-07-24 19:52:25 +02:00
commit 654d996a53
Signed by: catalin
GPG key ID: 0178DF42F43E5FD2
7 changed files with 60 additions and 6 deletions

View 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""