From 952bf485126d9f0e3c2357288a31c10d99c9966f Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 1 Sep 2016 16:24:09 +0200 Subject: Archive item to exclude them from merge detection mechanism --- ishtar_common/tests.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'ishtar_common/tests.py') diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 565fdce2b..8c918b5a9 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -218,6 +218,18 @@ class MergeTest(TestCase): self.assertTrue(self.person_types[1] in self.person_3.person_types.all()) + def testPersonMergeCandidate(self): + init_mc = self.person_1.merge_candidate.count() + person = models.Person.objects.create( + name=self.person_1.name, + surname=self.person_1.surname, history_modifier=self.user, + attached_to=self.person_1.attached_to) + self.assertEqual(self.person_1.merge_candidate.count(), + init_mc + 1) + person.archive() + self.assertEqual(self.person_1.merge_candidate.count(), + init_mc) + class ImportTest(TestCase): def testDeleteRelated(self): -- cgit v1.2.3