summaryrefslogtreecommitdiff
path: root/archaeological_operations/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@proxience.com>2015-06-10 22:37:33 +0200
committerÉtienne Loks <etienne.loks@proxience.com>2015-06-10 22:37:33 +0200
commit2b61ae7f85e12d557163efdf1ee06875a0327c4a (patch)
tree5710722a8a615cc3387943178b84dc44939cc402 /archaeological_operations/tests.py
parent032fe5ede7cc937a84b4c7477dabe007a5050e9d (diff)
parent8f5e6d05d1bca7a02924b419ba70198e7d325af3 (diff)
downloadIshtar-2b61ae7f85e12d557163efdf1ee06875a0327c4a.tar.bz2
Ishtar-2b61ae7f85e12d557163efdf1ee06875a0327c4a.zip
Merge branch 'stable'
Conflicts: archaeological_operations/models.py
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