Declared study_id explicitly.

Hope this helps a failing Travis CI build
This commit is contained in:
mike cullerton 2021-06-22 15:50:12 -04:00
parent f764c5ed79
commit a085629d1e

View File

@ -97,6 +97,7 @@ class Sanity_Check_Test(unittest.TestCase):
def test_delete_study(self):
# Create study
study = self.add_study()
study_id = study.STUDYID
# Add requirements and Q_COMPLETE
form = StudyForm(formdata=None, obj=study)
@ -128,12 +129,12 @@ class Sanity_Check_Test(unittest.TestCase):
event = 'Approval New Protocol'
event_id = '57'
event_string = f"('{event_id}', '{event}')"
print(event_string)
status = 'Open to enrollment'
status_id ='2'
status_string = f"('{status_id}', '{status}')"
print(status_string)
self.app.post(f'/irb_info/{study.STUDYID}', data={'UVA_STUDY_TRACKING': tracking_string, 'IRBEVENT': event_string, 'IRB_STATUS': status_string})
self.app.post(f'/irb_info/{study_id}', data={'UVA_STUDY_TRACKING': tracking_string, 'IRBEVENT': event_string, 'IRB_STATUS': status_string})
irb_info = IRBInfo.query.filter(IRBInfo.SS_STUDY_ID == study.STUDYID).first()
self.assertEqual(irb_info.UVA_STUDY_TRACKING, tracking_string)
self.assertEqual(irb_info.IRBEVENT[0].EVENT, event)