diff options
Diffstat (limited to 'archaeological_finds/tests.py')
| -rw-r--r-- | archaeological_finds/tests.py | 13 | 
1 files changed, 12 insertions, 1 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py index 41e113245..86c7936ba 100644 --- a/archaeological_finds/tests.py +++ b/archaeological_finds/tests.py @@ -123,6 +123,11 @@ class FindWizardCreationTest(WizardTest, FindInit, TestCase):                          'period': None,                          'start_date': '0',                          'end_date': '200', +                    }, +                    { +                        'period': None, +                        'start_date': '0', +                        'end_date': '200',                      }                  ]              }, @@ -135,8 +140,11 @@ class FindWizardCreationTest(WizardTest, FindInit, TestCase):          self.form_datas[0].form_datas['selecrecord-find_creation']['pk'] = \              cr.pk +        period = Period.objects.all()[0].pk          self.form_datas[0].form_datas['dating-find_creation'][0]['period'] = \ -            Period.objects.all()[0].pk +            period +        self.form_datas[0].form_datas['dating-find_creation'][1]['period'] = \ +            period          self.find_number = models.Find.objects.count()          self.basefind_number = models.BaseFind.objects.count()          super(FindWizardCreationTest, self).pre_wizard() @@ -146,6 +154,9 @@ class FindWizardCreationTest(WizardTest, FindInit, TestCase):                           self.basefind_number + 1)          self.assertEqual(models.Find.objects.count(),                           self.find_number + 1) +        # identical datings, only one should be finaly save +        f = models.Find.objects.order_by("-pk").all()[0] +        self.assertEqual(f.datings.count(), 1)  class FindWizardDeletionWithWarehouseModTest(WizardTest, FindInit, TestCase):  | 
