Skip to content

Commit

Permalink
tests: reindex entry
Browse files Browse the repository at this point in the history
  • Loading branch information
pwall2222 committed Nov 10, 2023
1 parent 3b02ef4 commit 97095af
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,17 @@ def test_is_custom_property_protected(self):
self.assertFalse(e.is_custom_property_protected('not-protected'))
self.assertFalse(e.is_custom_property_protected('non-existent'))

def test_reindex(self):
e1 = self.kp.add_entry(self.kp.root_group, 'Test-Index1', 'user-index', 'pass')
e2 = self.kp.add_entry(self.kp.root_group, 'Test-Index2', 'user-index', 'pass')
e3 = self.kp.add_entry(self.kp.root_group, 'Test-Index3', 'user-index', 'pass')
e4 = self.kp.add_entry(self.kp.root_group, 'Test-Index4', 'user-index', 'pass')
e2.reindex(0)
e3.reindex(0)
e4.reindex(0)
entries = self.kp.find_entries(username="user-index")
self.assertEqual(entries, [e4,e3,e2,e1])


class EntryHistoryTests3(KDBX3Tests):

Expand Down

0 comments on commit 97095af

Please sign in to comment.