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.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/archaeological_operations/tests.py b/archaeological_operations/tests.py
index 9f07aff45..af6199774 100644
--- a/archaeological_operations/tests.py
+++ b/archaeological_operations/tests.py
@@ -1221,6 +1221,29 @@ class CustomFormTest(TestCase, OperationInitTest):
msg="filter user - 'address' field not found on the modification "
"wizard. It should not have been filtered.")
+ def test_enabled(self):
+ c = Client()
+ c.login(username=self.username, password=self.password)
+
+ cls_wiz = OperationWizardModifTest
+ url = reverse(cls_wiz.url_name)
+ # first wizard step
+ step = 'selec-operation_modification'
+ cls_wiz.wizard_post(c, url, step, {'pk': self.operations[0].pk})
+
+ step = 'collaborators-operation_modification'
+ data = {
+ '{}{}-current_step'.format(cls_wiz.url_name,
+ cls_wiz.wizard_name): [step],
+ }
+ response = c.post(url, data)
+ self.assertNotEqual(response.status_code, 404)
+ CustomForm.objects.create(
+ name="Test2", form="operation-collaborators", available=True,
+ apply_to_all=True, enabled=False)
+ response = c.post(url, data)
+ self.assertEqual(response.status_code, 404)
+
class OperationSearchTest(TestCase, OperationInitTest):
fixtures = FILE_FIXTURES