From 029eba4c18446c92636ccc1c36ef524a48cbbedf Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 25 Jun 2015 02:23:23 +0200 Subject: Import: add test for MCC context record import --- archaeological_operations/tests.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'archaeological_operations') diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 9abc62bd4..527e10295 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -49,6 +49,7 @@ class ImportOperationTest(TestCase): '../ishtar_common/fixtures/initial_importtypes-fr.json', settings.ROOT_PATH + '../archaeological_operations/fixtures/initial_data-fr.json'] + test_operations = True def setUp(self): self.username, self.password, self.user = create_superuser() @@ -56,6 +57,8 @@ class ImportOperationTest(TestCase): def testMCCImportOperation(self, test=True): # MCC opérations + if self.test_operations == False: + test = False first_ope_nb = models.Operation.objects.count() MCC_OPERATION = ImporterType.objects.get(name=u"MCC - Opérations") mcc_operation_file = open(settings.ROOT_PATH + \ @@ -127,6 +130,8 @@ class ImportOperationTest(TestCase): models.Operation.objects.order_by('-pk').all()[0]) def testMCCImportParcels(self, test=True): + if self.test_operations == False: + test = False self.testMCCImportOperation(test=False) old_nb = models.Parcel.objects.count() MCC_PARCEL = ImporterType.objects.get(name=u"MCC - Parcelles") -- cgit v1.2.3