Skip to content

Commit

Permalink
Update exception error message
Browse files Browse the repository at this point in the history
  • Loading branch information
DevChima committed Feb 19, 2025
1 parent 3329359 commit ce3cbc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion home/import_assessments.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ def from_flat(cls, row: dict[str, str], row_num: int) -> "AssessmentRow":
if field not in row or row[field] == ""
]
raise ImportAssessmentException(
f"The import file is missing required fields: {', '.join(missing_fields)}",
f"Row missing values for required fields: {', '.join(missing_fields)}",
row_num,
)

Expand Down
2 changes: 1 addition & 1 deletion home/tests/test_assessment_import_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ def test_missing_title(self, csv_impexp: ImportExport) -> None:
"""
with pytest.raises(ImportAssessmentException) as e:
csv_impexp.import_file("assessments_missing_title.csv")
assert e.value.message == "The import file is missing required fields: title"
assert e.value.message == "Row missing values for required fields: title"
assert e.value.row_num == 4

def test_empty_rows(self, csv_impexp: ImportExport) -> None:
Expand Down

0 comments on commit ce3cbc9

Please sign in to comment.