Skip to content

Commit

Permalink
pykeepass fixed #4
Browse files Browse the repository at this point in the history
  • Loading branch information
fopina committed Jan 27, 2019
1 parent e65872c commit 420d83b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,24 @@ def test_run_keyfile(self, ch_mock, gp_mock):
mock.call('blabla')
])

@mock.patch('getpass.getpass')
@mock.patch('kdbxpasswordpwned.check_hash')
def test_issue_4(self, ch_mock, gp_mock):
'''
https://github.com/fopina/kdbxpasswordpwned/issues/4
argon format support added by moving
from libkeepass to pykeepass
'''
gp_mock.return_value = '123456'
ch_mock.return_value = 0
with _capture_output() as fout:
kdbxpasswordpwned.main([
_asset('issue_4.kdbx'),
])
self.assertEqual(fout[0].getvalue(), '')
ch_mock.assert_not_called()



def _asset(name):
return os.path.join(
Expand Down

0 comments on commit 420d83b

Please sign in to comment.