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.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index a8d8e6415..9111c9ffe 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -54,20 +54,6 @@ class ImportOperationTest(TestCase):
self.username, self.password, self.user = create_superuser()
self.ishtar_user = IshtarUser.objects.get(pk=self.user.pk)
- #def testImportDbfOperation(self):
- # """
- # Test operation import
- # """
- # call_command('import_operations', os.sep.join([os.getcwd(), '..',
- # 'archaeological_operations', 'tests', 'sample.dbf']))
-
- #def testImportCsvOperation(self):
- # """
- # Test operation import
- # """
- # call_command('import_operations', os.sep.join([os.getcwd(), '..',
- # 'archaeological_operations', 'tests', 'sample.csv']))
-
def testMCCImports(self):
# MCC opérations
first_ope_nb = models.Operation.objects.count()
@@ -111,6 +97,12 @@ class ImportOperationTest(TestCase):
self.assertTrue(last_ope.code_patriarche == 4000)
self.assertTrue(last_ope.operation_type.txt_idx == 'prog_excavation')
+ # a second importation will be not possible: no two same patriarche code
+ impt.importation()
+ new_current_ope_nb = models.Operation.objects.count()
+ self.assertTrue(last_ope ==
+ models.Operation.objects.order_by('-pk').all()[0])
+
def testParseParcels(self):
# the database needs to be initialised before importing
from archaeological_operations.import_from_csv import parse_parcels