summaryrefslogtreecommitdiff
path: root/archaeological_operations
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-10-28 13:40:59 +0100
committerÉtienne Loks <etienne.loks@proxience.com>2015-10-28 13:40:59 +0100
commitb52d37e7b8fc08e071659cff281c1c583034c352 (patch)
tree1ecad22e5f83a9a77a1dc40e3f9e0bc749acef83 /archaeological_operations
parentfc10df61184f3d06137a2b6f062b94c70d621688 (diff)
downloadIshtar-b52d37e7b8fc08e071659cff281c1c583034c352.tar.bz2
Ishtar-b52d37e7b8fc08e071659cff281c1c583034c352.zip
Imports: update MCC tests - fix m2m creation when not valu is provided
Diffstat (limited to 'archaeological_operations')
-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",