From ba5d2560e7cfcfc4f6edc28ad2e0eeebdb674447 Mon Sep 17 00:00:00 2001
From: Jorran Wit <jorrandewit@outlook.com>
Date: Sun, 1 Jan 2017 13:18:40 +0100
Subject: [PATCH] Add no-validation-test for form

Add test to check expected ValueError
on processing form before validation.
---
 commentaries/test_forms.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/commentaries/test_forms.py b/commentaries/test_forms.py
index 29147a1d5..bd41e58a1 100644
--- a/commentaries/test_forms.py
+++ b/commentaries/test_forms.py
@@ -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']
-- 
GitLab