SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit ba5d2560 authored by Jorran de Wit's avatar Jorran de Wit
Browse files

Add no-validation-test for form

Add test to check expected ValueError
on processing form before validation.
parent c843f212
No related branches found
No related tags found
No related merge requests found
......@@ -64,6 +64,11 @@ class TestVetCommentaryForm(TestCase):
VetCommentaryForm.REFUSAL_UNTRACEBLE]
self.assertEqual(form.get_refusal_reason(), refusal_reason_inserted)
def test_process_before_validation(self):
"""Test response of form on processing before validation"""
form = VetCommentaryForm(self.form_data, commentary_id=self.commentary.id, user=self.user)
self.assertRaises(ValueError, form.process_commentary)
class TestRequestCommentaryForm(TestCase):
fixtures = ['permissions', 'groups']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment