diff options
| 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 | 
| commit | 02514c1524cf8572dd37d3e0361b3b052ea8e38d (patch) | |
| tree | 5710722a8a615cc3387943178b84dc44939cc402 /archaeological_operations/tests.py | |
| parent | 84e238594b78720478c338fa656909a36374b718 (diff) | |
| parent | 0703ce30b58d8e8273543e5ddd353759e5892e06 (diff) | |
| download | Ishtar-02514c1524cf8572dd37d3e0361b3b052ea8e38d.tar.bz2 Ishtar-02514c1524cf8572dd37d3e0361b3b052ea8e38d.zip | |
Merge branch 'stable'
Conflicts:
	archaeological_operations/models.py
Diffstat (limited to 'archaeological_operations/tests.py')
| -rw-r--r-- | archaeological_operations/tests.py | 20 | 
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 | 
