feat: add -c/--config flag to every command
This commit is contained in:
parent
570c29d9f1
commit
6f45b76579
10 changed files with 163 additions and 51 deletions
|
|
@ -8,11 +8,16 @@ def test_edit_raises_invalid_age_file(notes, settings: Settings):
|
|||
note_path = settings.notebooks_root_path / "foo.txt"
|
||||
note_path.touch()
|
||||
with pytest.raises(ValueError, match="is not a valid AGE file"):
|
||||
EditCommand(note_path, settings=settings, )
|
||||
EditCommand(
|
||||
note_path,
|
||||
settings=settings,
|
||||
)
|
||||
|
||||
|
||||
def test_edit_current_note(mock_edit, current_note, settings: Settings, encryptor):
|
||||
edit_command = EditCommand(note_path=settings.notebooks_root_path, settings=settings)
|
||||
edit_command = EditCommand(
|
||||
note_path=settings.notebooks_root_path, settings=settings
|
||||
)
|
||||
assert edit_command.note_path == current_note
|
||||
edit_command.run()
|
||||
with current_note.open("rb") as f:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue