diff options
| author | Étienne Loks <etienne.loks@proxience.com> | 2015-06-18 04:15:51 +0200 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@proxience.com> | 2015-06-18 04:15:51 +0200 | 
| commit | 1dd34cabdccaec51c2b7b06099c66a068ff58aae (patch) | |
| tree | c3bfac05e741416a39f2714a7b7e6529e24785d0 /archaeological_operations/tests.py | |
| parent | beefa1c57af2dae4f77304de653b54ddbdc88df5 (diff) | |
| download | Ishtar-1dd34cabdccaec51c2b7b06099c66a068ff58aae.tar.bz2 Ishtar-1dd34cabdccaec51c2b7b06099c66a068ff58aae.zip | |
Import: really prevent from associating not created object to an import
Diffstat (limited to 'archaeological_operations/tests.py')
| -rw-r--r-- | archaeological_operations/tests.py | 3 | 
1 files changed, 3 insertions, 0 deletions
| diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 484e2b259..bbe92b3c8 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -162,8 +162,11 @@ class ImportOperationTest(TestCase):                           sorted([p.section for p in last_parcels]))          last_ope = models.Operation.objects.order_by('-pk').all()[0]          towns_ope = last_ope.towns.all() +        imported = [imp for acc, imp in impt.get_all_imported()]          for p in last_parcels:              self.assertTrue(p.town in towns_ope) +            self.assertTrue(p in imported) +        self.assertEqual(len(imported), len(last_parcels))          self.assertEqual(models.Parcel.objects.get(parcel_number='55',                                                     section='YY').external_id,                          'YY55') | 
