diff options
Diffstat (limited to 'archaeological_operations/tests.py')
| -rw-r--r-- | archaeological_operations/tests.py | 26 | 
1 files changed, 26 insertions, 0 deletions
| diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py index 316e3c897..2aa64ed15 100644 --- a/archaeological_operations/tests.py +++ b/archaeological_operations/tests.py @@ -697,6 +697,32 @@ class OperationWizardCreationTest(WizardTest, OperationInitTest, TestCase):                           self.operation_number + 1) +class OperationWizardDeleteTest(OperationWizardCreationTest): +    fixtures = OperationWizardCreationTest.fixtures +    url_name = 'operation_deletion' +    wizard_name = 'operation_deletion_wizard' +    steps = views.operation_deletion_steps +    form_datas = [ +        FormData( +            "Wizard deletion test", +            form_datas={ +                'selec-operation_deletion': {'pk': None}, +            } +        ) +    ] + +    def pre_wizard(self): +        self.ope = self.get_default_operation(force=True) +        self.form_datas[0].form_datas['selec-operation_deletion']['pk'] = \ +            self.ope.pk +        self.operation_number = models.Operation.objects.count() +        super(OperationWizardDeleteTest, self).pre_wizard() + +    def post_wizard(self): +        self.assertEqual(self.operation_number - 1, +                         models.Operation.objects.count()) + +  class OperationWizardClosingTest(OperationWizardCreationTest):      fixtures = OperationWizardCreationTest.fixtures      url_name = 'operation_closing' | 
