From 598da46bf236f7adfa092019d2cd465a7cc8fa13 Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Tue, 6 Jun 2017 12:25:03 +0200
Subject: [PATCH] Add basic report test

---
 submissions/test_views.py | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/submissions/test_views.py b/submissions/test_views.py
index bf64009bd..644254f33 100644
--- a/submissions/test_views.py
+++ b/submissions/test_views.py
@@ -183,7 +183,7 @@ class SubmitManuscriptTest(BaseContributorTestCase):
         self.assertEqual(response.status_code, 200)
         self.assertIsInstance(response.context['form'], RequestSubmissionForm)
         self.assertFalse(response.context['form'].is_valid())
-        print(response.context['form'].errors.as_data())
+        self.assertIn('author_list', response.context['form'].errors.keys())
 
         # No real check is done here to see if submission submit is aborted.
         # To be implemented after Arxiv caller.
@@ -248,4 +248,16 @@ class SubmissionListTest(BaseContributorTestCase):
         self.assertListEqual(returned_submissions_ids, visible_submission_ids)
 
 
-# class SubmitReportTest
+class SubmitReportTest(BaseContributorTestCase):
+    def setUp(self):
+        super().setUp()
+        self.client = Client()
+        self.submission = EICassignedSubmissionFactory()
+        self.target = reverse(
+            'submissions:submit_report',
+            kwargs={'arxiv_identifier_w_vn_nr': self.submission.arxiv_identifier_w_vn_nr}
+        )
+
+    def test_status_code_200(self):
+        response = self.client.get(self.target)
+        self.assertEqual(response.status_code, 200)
-- 
GitLab