Adjustings tests for protocol builder status changes

This commit is contained in:
Carlos Lopez 2020-07-29 10:51:34 -06:00
parent 73a6b7adf1
commit de49397549
2 changed files with 3 additions and 3 deletions

View File

@ -146,7 +146,7 @@ class Study(object):
study_model.last_updated = datetime.datetime.now() study_model.last_updated = datetime.datetime.now()
study_model.protocol_builder_status = pb_status study_model.protocol_builder_status = pb_status
if pb_status == ProtocolBuilderStatus.OPEN: if pb_status == ProtocolBuilderStatus.open:
study_model.enrollment_date = self.enrollment_date study_model.enrollment_date = self.enrollment_date
change = { change = {

View File

@ -30,7 +30,7 @@ class TestStudyApi(BaseTest):
def add_test_study(self): def add_test_study(self):
study_schema = StudySchema().dump(self.TEST_STUDY) study_schema = StudySchema().dump(self.TEST_STUDY)
study_schema['protocol_builder_status'] = ProtocolBuilderStatus.ACTIVE.value study_schema['protocol_builder_status'] = ProtocolBuilderStatus.active.value
rv = self.app.post('/v1.0/study', rv = self.app.post('/v1.0/study',
content_type="application/json", content_type="application/json",
headers=self.logged_in_headers(), headers=self.logged_in_headers(),
@ -137,7 +137,7 @@ class TestStudyApi(BaseTest):
study: StudyModel = session.query(StudyModel).first() study: StudyModel = session.query(StudyModel).first()
study.title = "Pilot Study of Fjord Placement for Single Fraction Outcomes to Cortisol Susceptibility" study.title = "Pilot Study of Fjord Placement for Single Fraction Outcomes to Cortisol Susceptibility"
study_schema = StudySchema().dump(study) study_schema = StudySchema().dump(study)
study_schema['protocol_builder_status'] = ProtocolBuilderStatus.ACTIVE.value study_schema['protocol_builder_status'] = ProtocolBuilderStatus.active.value
rv = self.app.put('/v1.0/study/%i' % study.id, rv = self.app.put('/v1.0/study/%i' % study.id,
content_type="application/json", content_type="application/json",
headers=self.logged_in_headers(), headers=self.logged_in_headers(),