From a36a82f28ee691b420978e1a5b1dfd9b21580c6c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 18 Jun 2015 01:13:40 +0200 Subject: Import: manage different encoding for source file --- archaeological_operations/tests.py | 4 +++- archaeological_operations/tests/MCC-operations-example.csv | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index c7e75da1b..ccb67cc03 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -86,7 +86,8 @@ class ImportOperationTest(TestCase): # doing manualy connections tg = TargetKey.objects.filter(target__target='operation_type' ).order_by('-pk').all()[0] - tg.value = models.OperationType.objects.get(txt_idx='prog_excavation').pk + tg.value = models.OperationType.objects.get( + txt_idx='prog_excavation').pk tg.is_set = True tg.save() @@ -110,6 +111,7 @@ class ImportOperationTest(TestCase): self.assertTrue(current_ope_nb == (first_ope_nb + 1)) # and well imported last_ope = models.Operation.objects.order_by('-pk').all()[0] + self.assertEqual(last_ope.name, u"Oppìdum de Paris") self.assertTrue(last_ope.code_patriarche == 4200) self.assertTrue(last_ope.operation_type.txt_idx == 'prog_excavation') self.assertEqual(last_ope.periods.count(), 2) diff --git a/archaeological_operations/tests/MCC-operations-example.csv b/archaeological_operations/tests/MCC-operations-example.csv index 4962c0969..432ceffca 100644 --- a/archaeological_operations/tests/MCC-operations-example.csv +++ b/archaeological_operations/tests/MCC-operations-example.csv @@ -1,2 +1,2 @@ code OA,region,type operation,intitule operation,operateur,responsable operation,date debut terrain,date fin terrain,chronologie generale,identifiant document georeferencement,notice scientifique -4200,Bourgogne,Fouille programmée,Oppidum de Paris,L'opérateur,Jean Sui-Resp'on Sablé,2000/01/22,2002/12/31,Age du Fer & Gallo-Romain,, +4200,Bourgogne,Fouille programmée,Oppìdum de Paris,L'opérateur,Jean Sui-Resp'on Sablé,2000/01/22,2002/12/31,Age du Fer & Gallo-Romain,, -- cgit v1.2.3