Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
terazus committed Aug 1, 2023
1 parent 0a14a6d commit 2a09b31
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tests/test_lib/test_validator/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ def test_validate_errors_blanks(self):
blank_node: dict = deepcopy(self.default_node)
blank_node['data']['timepoint_(hours)'] = 8
blank_node['data']['compound_name'] = "EXTRACTION BLANK"
blank_node['data']['collection_order'] = 10
blank_node['data']['box_id'] = "Box1"

graph = VerticalValidator(self.general_information, validator)
graph.add_node(self.default_node)
Expand Down Expand Up @@ -210,7 +212,6 @@ def test_validate_replicate_missing(self):
graph.add_node(self.default_node)
graph.validate()
self.assertFalse(validator.report['valid'])
print(validator.report['errors'])
self.assertEqual(validator.report['errors'][self.organism][0]['message'],
"Replicate 1 is missing 1 timespoints(s).")

Expand Down
4 changes: 2 additions & 2 deletions tests/test_lib/test_validator/test_validate_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ def test_report_validation_error(self, mock_rm, mock_excel_file, mocked_get_sess
validator = ExcelValidator(1)
validator.validate()
errors = validator.report['errors']
self.assertEqual(errors['Record at line 3 (FAC002LA1)'],
[{'message': 'This field is required.', 'field_concerned': 'exposure_route'}])
self.assertIn({'message': 'This field is required.', 'field_concerned': 'exposure_route'},
errors['Record at line 3 (FAC002LA1)'])
self.assertEqual(validator.report['valid'], False)

def test_report_file_not_found(self, mocked_get_session, mocked_validate_identifier, mocked_gdrive_connector,
Expand Down

0 comments on commit 2a09b31

Please sign in to comment.