mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-27 21:16:14 +02:00
Improve handling of mocking logic in pytest (#1382)
* WIP * fix handling of user input (stdin, input, getpass) * take out redundant pytest step * fix handling of 'we should' statements * fix test that doesn't use a config file * fix another test that uses stdin Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com> * remove .tool-versions file per PR feedback * add comment to clarify why disembodied variables are here Co-authored-by: Micah Jerome Ellison <micah.jerome.ellison@gmail.com>
This commit is contained in:
parent
3518e37087
commit
2ab485de8c
16 changed files with 259 additions and 197 deletions
|
@ -2,8 +2,9 @@ Feature: Encrypting and decrypting journals
|
|||
|
||||
Scenario: Decrypting a journal
|
||||
Given we use the config "encrypted.yaml"
|
||||
# And we use the password "bad doggie no biscuit" if prompted
|
||||
When we run "jrnl --decrypt" and enter "bad doggie no biscuit"
|
||||
Then we should see the message "Journal decrypted"
|
||||
Then the output should contain "Journal decrypted"
|
||||
And the config for journal "default" should contain "encrypt: false"
|
||||
When we run "jrnl -99 --short"
|
||||
Then the output should be
|
||||
|
@ -35,7 +36,7 @@ Feature: Encrypting and decrypting journals
|
|||
swordfish
|
||||
n
|
||||
Then we should get no error
|
||||
And we should see the message "Journal encrypted"
|
||||
And the output should contain "Journal encrypted"
|
||||
And the config for journal "default" should contain "encrypt: true"
|
||||
When we run "jrnl -n 1" and enter "swordfish"
|
||||
Then we should be prompted for a password
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue