From 332892266f33d5fb51b867f3325970e6d8a059f2 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sun, 6 Dec 2015 11:14:28 +0000 Subject: [PATCH] Fix reference map unit test A bad handle now rasies a HandleError rather than returning None. --- .../plugins/database/bsddb_support/test/reference_map_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps/plugins/database/bsddb_support/test/reference_map_test.py b/gramps/plugins/database/bsddb_support/test/reference_map_test.py index c5f3cc478..e726eeaaf 100644 --- a/gramps/plugins/database/bsddb_support/test/reference_map_test.py +++ b/gramps/plugins/database/bsddb_support/test/reference_map_test.py @@ -24,6 +24,7 @@ import time from .. import DbTxn from gramps.gen.lib import Person, Event, Source, Citation +from gramps.gen.errors import HandleError logger = logging.getLogger('Gramps.GrampsDbBase_Test') @@ -109,7 +110,8 @@ class ReferenceMapTest(GrampsDbBaseTest): with DbTxn("Del Person", self._db) as tran: self._db.remove_person(person.get_handle(),tran) - self.assertIsNone(self._db.get_person_from_handle(person.get_handle())) + self.assertRaises(HandleError, self._db.get_person_from_handle, + person.get_handle()) references = list(self._db.find_backlink_handles(citation.get_handle()))