diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-12-21 11:28:27 +0100 | 
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-12-21 11:28:27 +0100 | 
| commit | b980a111c641a6e48f58e66729fd22b256e43ac4 (patch) | |
| tree | e86490f17270443374bcff68c0c72ecd5be49b9e /archaeological_operations/tests.py | |
| parent | 09d2e8f39d49bf7951d78423f2202cdedd444a23 (diff) | |
| download | Ishtar-b980a111c641a6e48f58e66729fd22b256e43ac4.tar.bz2 Ishtar-b980a111c641a6e48f58e66729fd22b256e43ac4.zip | |
Operation deletion test - adjust migration dependencies
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' | 
