mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-10 16:48:31 +02:00
Remove tests for having password in config
This commit is contained in:
parent
a96435b6dc
commit
c6c425093e
3 changed files with 2 additions and 22 deletions
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
"default_hour": 9,
|
|
||||||
"timeformat": "%Y-%m-%d %H:%M",
|
|
||||||
"linewrap": 80,
|
|
||||||
"encrypt": true,
|
|
||||||
"editor": "",
|
|
||||||
"default_minute": 0,
|
|
||||||
"highlight": true,
|
|
||||||
"password": "bad doggie no biscuit",
|
|
||||||
"journals": {
|
|
||||||
"default": "features/journals/encrypted.journal"
|
|
||||||
},
|
|
||||||
"tagsymbols": "@"
|
|
||||||
}
|
|
|
@ -6,11 +6,6 @@
|
||||||
Then we should see the message "Password"
|
Then we should see the message "Password"
|
||||||
and the output should contain "2013-06-10 15:40 Life is good"
|
and the output should contain "2013-06-10 15:40 Life is good"
|
||||||
|
|
||||||
Scenario: Loading an encrypted journal with password in config
|
|
||||||
Given we use the config "encrypted_with_pw.json"
|
|
||||||
When we run "jrnl -n 1"
|
|
||||||
Then the output should contain "2013-06-10 15:40 Life is good"
|
|
||||||
|
|
||||||
Scenario: Decrypting a journal
|
Scenario: Decrypting a journal
|
||||||
Given we use the config "encrypted.json"
|
Given we use the config "encrypted.json"
|
||||||
When we run "jrnl --decrypt" and enter "bad doggie no biscuit"
|
When we run "jrnl --decrypt" and enter "bad doggie no biscuit"
|
||||||
|
@ -26,4 +21,3 @@
|
||||||
When we run "jrnl -n 1" and enter "swordfish"
|
When we run "jrnl -n 1" and enter "swordfish"
|
||||||
Then we should see the message "Password"
|
Then we should see the message "Password"
|
||||||
and the output should contain "2013-06-10 15:40 Life is good"
|
and the output should contain "2013-06-10 15:40 Life is good"
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ def set_keychain(journal_name, password):
|
||||||
keyring.delete_password('jrnl', journal_name)
|
keyring.delete_password('jrnl', journal_name)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
else:
|
elif not TEST:
|
||||||
keyring.set_password('jrnl', journal_name, password)
|
keyring.set_password('jrnl', journal_name, password)
|
||||||
|
|
||||||
def u(s):
|
def u(s):
|
||||||
|
@ -69,7 +69,7 @@ def py23_input(msg):
|
||||||
def yesno(prompt, default=True):
|
def yesno(prompt, default=True):
|
||||||
prompt = prompt.strip() + (" [Yn]" if default else "[yN]")
|
prompt = prompt.strip() + (" [Yn]" if default else "[yN]")
|
||||||
raw = py23_input(prompt)
|
raw = py23_input(prompt)
|
||||||
return {'y': True, 'n': False}.get(raw.lower(), default)
|
return {'y': True, 'n': False}.get(raw.lower(), default)
|
||||||
|
|
||||||
def get_local_timezone():
|
def get_local_timezone():
|
||||||
"""Returns the Olson identifier of the local timezone.
|
"""Returns the Olson identifier of the local timezone.
|
||||||
|
|
Loading…
Add table
Reference in a new issue