feat: make the inclusion of each notebook's note optional via --include-notes when listing notebooks

This commit is contained in:
cătălin 2024-05-17 18:45:22 +02:00
commit 3d93be39d6
No known key found for this signature in database
8 changed files with 632 additions and 512 deletions

View file

@ -1,5 +1,6 @@
import pytest
from halig import utils
from halig.commands.reencrypt import ReencryptCommand
@ -14,3 +15,11 @@ def test_reencrypt(reencrypt_command):
for note_path in reencrypt_command.traverse():
with note_path.open("rb") as f:
assert reencrypt_command.encryptor.decrypt(f.read()) == b""
@pytest.mark.usefixtures("current_daily")
def test_reencrypt_warns_no_matching_key(reencrypt_command, halig_ssh_path, capfd):
reencrypt_command.encryptor.identities = []
reencrypt_command.run()
out, _ = capfd.readouterr()
assert f'because no matching keys were found, skipping ...' in out