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.py42
1 files changed, 42 insertions, 0 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 29a7fdb00..5b7f71e1b 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -648,3 +648,45 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase):
def post_wizard(self):
self.assertEqual(models.Operation.objects.count(),
self.operation_number + 1)
+
+
+class OperationAdminActWizardCreationTest(WizardTest, OperationInitTest,
+ TestCase):
+ fixtures = [settings.ROOT_PATH +
+ '../fixtures/initial_data-auth-fr.json',
+ settings.ROOT_PATH +
+ '../ishtar_common/fixtures/initial_data-fr.json',
+ settings.ROOT_PATH +
+ '../archaeological_files/fixtures/initial_data.json',
+ settings.ROOT_PATH +
+ '../archaeological_operations/fixtures/initial_data-fr.json']
+ url_name = 'operation_administrativeactop'
+ wizard_name = 'operation_administrative_act_wizard'
+ steps = views.administrativeactop_steps
+ form_datas = [[
+ # data
+ {
+ 'selec-operation_administrativeactop': {
+ },
+ 'administrativeact-operation_administrativeactop': {
+ 'signature_date': str(datetime.date.today())
+ }
+ },
+ # ignored
+ []
+ ]]
+
+ def pre_wizard(self):
+ ope = self.get_default_operation()
+ self.operation_number = models.Operation.objects.count()
+ data = self.form_datas[0][0]
+ data['selec-operation_administrativeactop']['pk'] = ope.pk
+ act = models.ActType.objects.filter(intented_to='O').all()[0].pk
+
+ data['administrativeact-operation_administrativeactop'][
+ 'act_type'] = act
+ super(OperationAdminActWizardCreationTest, self).pre_wizard()
+
+ def post_wizard(self):
+ self.assertEqual(models.Operation.objects.count(),
+ self.operation_number + 1)