summaryrefslogtreecommitdiff
path: root/archaeological_operations/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'archaeological_operations/tests.py')
-rw-r--r--archaeological_operations/tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index eaf2f081b..e74f579ed 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -166,7 +166,7 @@ class ImportOperationTest(TestCase):
self.assertTrue(current_nb == (old_nb + 2))
# and well imported
last_parcels = models.Parcel.objects.order_by('-pk').all()[0:2]
- external_ids = sorted(['XXXX', 'YY55'])
+ external_ids = sorted(['4200-59350-YY55', '4200-75101-XXXX'])
parcel_numbers = sorted(['42', '55'])
sections = sorted(['ZX', 'YY'])
self.assertEqual(external_ids,
@@ -184,13 +184,15 @@ class ImportOperationTest(TestCase):
self.assertEqual(len(imported), len(last_parcels))
self.assertEqual(models.Parcel.objects.get(parcel_number='55',
section='YY').external_id,
- 'YY55')
+ '4200-59350-YY55')
# delete associated parcel with the import deletion
parcel_count = models.Parcel.objects.count()
impt.delete()
self.assertEqual(parcel_count - 2, models.Parcel.objects.count())
def testParseParcels(self):
+ if not self.test_operations:
+ return
# the database needs to be initialised before importing
from archaeological_operations.import_from_csv import parse_parcels
# default_town = Town.objects.create(numero_insee="12345",