diff options
Diffstat (limited to 'archaeological_finds/tests.py')
-rw-r--r-- | archaeological_finds/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py index f75e9cfa3..9102a8c1a 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -42,6 +42,7 @@ class ImportFindTest(ImportContextRecordTest): self.testMCCImportContextRecords(test=False) old_nb = models.BaseFind.objects.count() + old_nb_find = models.Find.objects.count() MCC = ImporterType.objects.get(name=u"MCC - Mobilier") mcc_file = open( settings.ROOT_PATH + @@ -60,15 +61,21 @@ class ImportFindTest(ImportContextRecordTest): # doing manual connections ceram = models.MaterialType.objects.get(txt_idx='ceramic').pk + glass = models.MaterialType.objects.get(txt_idx='glass').pk self.setTargetKey('find__material_types', 'terre-cuite', ceram) + self.setTargetKey('find__material_types', 'verre', glass) impt.importation() if not test: return # new finds has now been imported current_nb = models.BaseFind.objects.count() self.assertTrue(current_nb == (old_nb + 4)) + current_nb = models.Find.objects.count() + self.assertTrue(current_nb == (old_nb_find + 4)) self.assertEqual( models.Find.objects.filter(material_types__pk=ceram).count(), 4) + self.assertEqual( + models.Find.objects.filter(material_types__pk=glass).count(), 1) class FindInit(ContextRecordInit): |