From c56a7c23444b269bf3d672bf82ea7f0679c6bfa8 Mon Sep 17 00:00:00 2001 From: mike cullerton Date: Mon, 12 Jul 2021 17:11:02 -0400 Subject: [PATCH] Assert that even though we only submit REVIEW_TYPE in the form, both REVIEW_TYPE and REVIEWTYPENAME are set in the database. --- tests/test_sanity.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/test_sanity.py b/tests/test_sanity.py index dfea45e..227ac70 100644 --- a/tests/test_sanity.py +++ b/tests/test_sanity.py @@ -236,12 +236,13 @@ class Sanity_Check_Test(unittest.TestCase): self.assertEqual(api_result.IDE, '1234') self.assertEqual(api_result.IND_1, 'abc') - - def test_study_details_validation(self): + def test_study_details(self): test_study = self.add_study() - data = {'IS_IND': 1, 'IND_1': 1234} + data = {'IS_IND': 1, 'IND_1': '1234', 'REVIEW_TYPE': 3} self.app.post(f'/study_details/{test_study.STUDYID}', data=data, follow_redirects=False) detail = StudyDetails.query.filter(StudyDetails.STUDYID == test_study.STUDYID).first() self.assertEqual(detail.IS_IND, 1) self.assertEqual(detail.IND_1, '1234') + self.assertEqual(detail.REVIEW_TYPE, 3) + self.assertEqual(detail.REVIEWTYPENAME, 'Expedited')