Commit graph

26 commits

Author SHA1 Message Date
Peter Schmidbauer
9664924096 Move all password handling to EncryptedJournal
This commit should greatly simplify all password handling logic. No passwords are stored in the config dict anymore. Only the Encrypted Journals have any password related logic. I also had to remove some password fields from the test files, which shows how dangerous the previous approach was. A slight code change could've leaked passwords to the config file. However, I had to change the install progress a little bit to make this work. It will now not ask you for a password right away but rather if you want to encrypt or not. Only if you reply 'y' will it ask you for the password later on.
2020-04-10 11:51:56 -07:00
Aaron Lichtman
1fd1fcc00d Exit jrnl if no text entered into editor
Add test for aborting jrnl entry from editor
Use native mocking
Add comment explaining discrepancy between expected and asserted output
Fix check_empty_output method
Check message on stderr and patch subprocess.call
Add _mock_editor_function
Update features/steps/core.py
Add return from mock function
Add debug statements
Debug
Update features/steps/core.py
Move sys.exit() down
Fix test?
Fix test?
Fix test?
Clean up debug statements
Clean up debug statements
Remove extraneous code
Remove extra space
Add test for empty stdin input
Remove extra debug line
Fix test?
Fix test?
Update features/core.feature
Fix test?
Fix no stdin input test

Co-Authored-By: pspeter <peter.schmidb@gmail.com>
2020-04-10 11:51:55 -07:00
Peter Schmidbauer
7f46d1a40a Fix handling of little-endian date format
Ever since version 2.0, when parsing a journal file, jrnl would not use
the custom date format string anymore. Instead, it relied on the
dateutil library to get the parsing right. This change was made to allow
people to change their date format without having to manually change
their file. However, this broke some existing date formats like
%d.%m.%Y, as it would falsely interpret the month as day and vice versa.
This commit adds some tests to catch this error and fixes it by trying
to parse the dates using the custom format first, only falling back to
dateutil when needed.
2020-04-10 11:51:55 -07:00
Greg Bodnar
623fa6c307 Create encrypted journal
Add failing test for configuring an encrypted journal
Overload open for EncryptedJournal

This avoids the execution path that calls EncryptedJournal._create()
without a password parameter. It results in duplication of code that
requests and stores a password, which should be factored out in a
subsequent change.

Modify test to test for returned strings

The entered string for the password is not being used by the test and I
don't understand why.

Use util wrapper for getpass

This allows for tests to run without prompting for user input.
2020-04-10 11:51:55 -07:00
Micah Jerome Ellison
f37f82f782 [GH-614] resolving issues around unreadable dates and unparsed dates 2020-04-10 11:51:55 -07:00
Philip Douglass
ba05411a80 User defined indent character (#419)
Make indent character configurable.
2016-04-15 23:00:49 -07:00
Manuel Ebert
4adb5c252a Update tests for templates 2015-07-01 22:23:13 -07:00
Manuel Ebert
0d1b381bd1 Merge pull request #347 from MinchinWeb/2.0-rc1-markdown-export-fix
2.0 rc1 markdown export fix
2015-04-20 14:29:17 +02:00
Manuel Ebert
9bf4e52b2c Tests for #343 2015-04-20 14:25:20 +02:00
MinchinWeb
f1a83a51ed Add testing for increasing Headings on Markdown export 2015-04-14 15:13:00 -06:00
Manuel Ebert
539a88ed14 Tests for parsing issue fix 2015-04-05 18:38:37 +02:00
Manuel Ebert
a1b5a4099e Work on cryptography 2014-09-27 13:15:46 -07:00
Manuel Ebert
e75e3d73a0 Converts tests to YAML 2014-09-12 15:28:12 -07:00
Manuel Ebert
60c03d96d6 Fixes config tests 2014-09-12 14:22:45 -07:00
Matt Hoffman
d5142a0a0a There should be a whitespace character in front of a tag. Fixes issue #237. 2014-07-22 22:14:26 -04:00
Manuel Ebert
88d4c52568 Tests for tagging 2014-07-02 15:35:05 +02:00
Manuel Ebert
00f122ed1a Tests for #153 2014-04-16 14:26:02 -04:00
Manuel Ebert
cabbbea694 Tests for fixing errors automatically 2013-11-03 14:38:41 -10:00
Manuel Ebert
49a540dbbf Tests for soft-deprecating passwords in config 2013-10-20 13:43:04 -07:00
Manuel Ebert
13b7d1c1df Tests for storing password in keychain 2013-10-17 16:26:49 -07:00
Manuel Ebert
c6c425093e Remove tests for having password in config 2013-10-17 16:00:45 -07:00
Manuel Ebert
1bab646c09 Tests for error messages on empty directories 2013-08-28 12:18:58 -07:00
Manuel Ebert
0fa981357e Initial support for DayOne integration testing 2013-08-17 11:59:51 -07:00
Manuel Ebert
1dfbfc2eaa Tests for tagging 2013-07-23 21:02:03 -07:00
Manuel Ebert
19f6fd3672 Test for decrypting journals when password is saved in config 2013-07-22 21:26:21 +02:00
Manuel Ebert
dbf5caa971 Changes cleaning strategy 2013-07-22 21:19:30 +02:00