Beispiel #1
0
 def test__entry_find_invalid_by_path_no_error(self):
     storage = KeepassDatabase(self._display, self._database_details_valid)
     actual_entry = storage._entry_find(self._search_path_invalid.search,
                                        ref_uuid=None,
                                        not_found_throw=False)
     self.assertEqual(None, actual_entry)
     self._display.assert_has_calls([
         call.v("Keepass: database found - %s" %
                self._database_details_valid["location"]),
         call.vvv("Keepass: keyfile found - %s" %
                  self._database_details_valid["keyfile"]),
         call.v("Keepass: database opened - %s" %
                self._database_details_valid["location"]),
         call.vv("KeePass: entry NOT found - %s" %
                 self._search_path_invalid.search),
     ])
Beispiel #2
0
 def test__entry_find_valid_by_path(self):
     storage = KeepassDatabase(self._display, self._database_details_valid)
     actual_entry = storage._entry_find(self._search_path_valid.search,
                                        ref_uuid=None,
                                        not_found_throw=True)
     self.assertDictEqual(self._database_entry,
                          EntryDump(actual_entry).__dict__)
     self._display.assert_has_calls([
         call.v("Keepass: database found - %s" %
                self._database_details_valid["location"]),
         call.vvv("Keepass: keyfile found - %s" %
                  self._database_details_valid["keyfile"]),
         call.v("Keepass: database opened - %s" %
                self._database_details_valid["location"]),
         call.vv("KeePass: entry found - %s" %
                 self._search_path_valid.search),
     ])