def test_from_lines_with_path_title_username(self): left = DBEntry(path='/a/b', title='testtitle', user_name='test_username') right = DBEntry.from_lines( left.path, ['Title: ' + left.title, 'UserName: ' + left.user_name], None) self.assertDBEntryEqual(left, right)
def test_from_lines_empty_password(self): password = '' salt = 'abc' left = DBEntry(path='/a/b', title='testtitle', user_name='test_username', password_hash=DBEntry.create_password_hash( password, salt), url='https://www.gmail.com', notes='nnn') right = DBEntry.from_lines(left.path, [ 'Title: ' + left.title, 'UserName: '******'Password: '******'URL: ' + left.url, 'Notes: ' + left.notes ], salt) self.assertDBEntryEqual(left, right)
def test_from_lines_empty(self): left = DBEntry() right = DBEntry.from_lines(None, [], None) self.assertDBEntryEqual(left, right)