Skip to content

Commit

Permalink
remove extraneous item names
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimpe committed Jul 17, 2024
1 parent 7f3999e commit e29f07c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions tdrs-backend/tdpservice/data_files/test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@ def assert_error_report_tanf_file_content_matches_with_friendly_names(response):
assert ws.cell(row=1, column=1).value == "Please refer to the most recent versions of the coding " \
+ "instructions (linked below) when looking up items and allowable values during the data revision process"
assert ws.cell(row=8, column=COL_ERROR_MESSAGE).value == (
"if Cash Amount :873 validator1 passed then Cash "
"and Cash Equivalents: Number of Months Item 21B "
"if Cash Amount :873 validator1 passed then Item 21B "
"(Cash and Cash Equivalents: Number of Months) 0 is not larger than 0."
)

Expand Down Expand Up @@ -136,8 +135,8 @@ def assert_error_report_file_content_matches_without_friendly_names(response):
assert ws.cell(row=1, column=1).value == "Please refer to the most recent versions of the coding " \
+ "instructions (linked below) when looking up items and allowable values during the data revision process"
assert ws.cell(row=8, column=COL_ERROR_MESSAGE).value == (
"Every T1 record should have at least one corresponding T2 or T3 "
"record with the same RPT_MONTH_YEAR and CASE_NUMBER."
"if CASH_AMOUNT :873 validator1 passed then Item 21B "
"(Cash and Cash Equivalents: Number of Months) 0 is not larger than 0."
)

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/parsers/test/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_if_validators():
name='Field2', friendly_name='field 2'),
]
))
assert result == (False, 'if Field1 :1 validator1 passed then Field2 Item 2 (field 2) 2 does not match 1.',
assert result == (False, 'if Field1 :1 validator1 passed then Item 2 (field 2) 2 does not match 1.',
['Field1', 'Field2'])


Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/parsers/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def if_then_validator_func(value, row_schema):
ending_error = "validator2 passed"

error_message = (f"if {condition_field_name} " + (center_error) +
f" then {result_field_name} " + ending_error)
f" then " + ending_error)
else:
error_message = None

Expand Down

0 comments on commit e29f07c

Please sign in to comment.