diff options
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/tests.py | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py index b64754ad6..7277eaef0 100644 --- a/archaeological_context_records/tests.py +++ b/archaeological_context_records/tests.py @@ -29,7 +29,7 @@ from django.test.client import Client from ishtar_common.models import IshtarSiteProfile, ImporterModel from archaeological_operations.tests import OperationInitTest, \ - ImportTest, ImportOperationTest + ImportTest, FILE_TOWNS_FIXTURES, FILE_FIXTURES, OPERATION_TOWNS_FIXTURES from archaeological_operations import models as models_ope from archaeological_context_records import models @@ -38,12 +38,19 @@ from ishtar_common.tests import WizardTest, WizardTestFormData as FormData, \ from archaeological_context_records import views -class ImportContextRecordTest(ImportTest, TestCase): +CONTEXT_RECORD_FIXTURES = FILE_FIXTURES + [ + settings.ROOT_PATH + + '../archaeological_context_records/fixtures/initial_data-fr.json', +] - fixtures = ImportOperationTest.fixtures + [ - settings.ROOT_PATH + - '../archaeological_context_records/fixtures/initial_data-fr.json', - ] +CONTEXT_RECORD_TOWNS_FIXTURES = FILE_TOWNS_FIXTURES + [ + settings.ROOT_PATH + + '../archaeological_context_records/fixtures/initial_data-fr.json', +] + + +class ImportContextRecordTest(ImportTest, TestCase): + fixtures = CONTEXT_RECORD_TOWNS_FIXTURES def test_mcc_import_contextrecords(self): old_nb = models.ContextRecord.objects.count() @@ -193,7 +200,7 @@ class ContextRecordInit(OperationInitTest): class ExportTest(ContextRecordInit, TestCase): - fixtures = ImportContextRecordTest.fixtures + fixtures = CONTEXT_RECORD_TOWNS_FIXTURES def setUp(self): self.username, self.password, self.user = create_superuser() @@ -222,7 +229,7 @@ class ExportTest(ContextRecordInit, TestCase): class ContextRecordTest(ContextRecordInit, TestCase): - fixtures = ImportContextRecordTest.fixtures + fixtures = CONTEXT_RECORD_TOWNS_FIXTURES def setUp(self): IshtarSiteProfile.objects.create() @@ -369,7 +376,7 @@ class ContextRecordTest(ContextRecordInit, TestCase): class ContextRecordSearchTest(ContextRecordInit, TestCase): - fixtures = ImportContextRecordTest.fixtures + fixtures = CONTEXT_RECORD_TOWNS_FIXTURES def setUp(self): IshtarSiteProfile.objects.create() @@ -511,7 +518,7 @@ class ContextRecordSearchTest(ContextRecordInit, TestCase): class RecordRelationsTest(ContextRecordInit, TestCase): - fixtures = ImportOperationTest.fixtures + fixtures = OPERATION_TOWNS_FIXTURES model = models.ContextRecord def setUp(self): @@ -561,7 +568,7 @@ class RecordRelationsTest(ContextRecordInit, TestCase): class ContextRecordWizardCreationTest(WizardTest, ContextRecordInit, TestCase): - fixtures = ImportOperationTest.fixtures + fixtures = OPERATION_TOWNS_FIXTURES url_name = 'record_creation' wizard_name = 'record_wizard' steps = views.record_creation_steps |