Fixing tests
This commit is contained in:
parent
6aa21638de
commit
73a6b7adf1
|
@ -196,7 +196,7 @@ class StudySchema(ma.Schema):
|
|||
id = fields.Integer(required=False, allow_none=True)
|
||||
categories = fields.List(fields.Nested(CategorySchema), dump_only=True)
|
||||
warnings = fields.List(fields.Nested(ApiErrorSchema), dump_only=True)
|
||||
protocol_builder_status = EnumField(ProtocolBuilderStatus)
|
||||
protocol_builder_status = EnumField(ProtocolBuilderStatus, by_value=True)
|
||||
hsr_number = fields.String(allow_none=True)
|
||||
sponsor = fields.String(allow_none=True)
|
||||
ind_number = fields.String(allow_none=True)
|
||||
|
|
|
@ -145,7 +145,7 @@ class TestStudyApi(BaseTest):
|
|||
self.assert_success(rv)
|
||||
json_data = json.loads(rv.get_data(as_text=True))
|
||||
self.assertEqual(study.title, json_data['title'])
|
||||
self.assertEqual(study.protocol_builder_status.name, json_data['protocol_builder_status'])
|
||||
self.assertEqual(study.protocol_builder_status.value, json_data['protocol_builder_status'])
|
||||
|
||||
@patch('crc.services.protocol_builder.ProtocolBuilderService.get_investigators') # mock_studies
|
||||
@patch('crc.services.protocol_builder.ProtocolBuilderService.get_required_docs') # mock_docs
|
||||
|
@ -230,7 +230,7 @@ class TestStudyApi(BaseTest):
|
|||
json_data = json.loads(rv.get_data(as_text=True))
|
||||
self.assertEqual(study.id, json_data['id'])
|
||||
self.assertEqual(study.title, json_data['title'])
|
||||
self.assertEqual(study.protocol_builder_status.name, json_data['protocol_builder_status'])
|
||||
self.assertEqual(study.protocol_builder_status.value, json_data['protocol_builder_status'])
|
||||
self.assertEqual(study.primary_investigator_id, json_data['primary_investigator_id'])
|
||||
self.assertEqual(study.sponsor, json_data['sponsor'])
|
||||
self.assertEqual(study.ind_number, json_data['ind_number'])
|
||||
|
|
Loading…
Reference in New Issue