From e29f07cb5eb335f6419afeab0c113864deed4451 Mon Sep 17 00:00:00 2001 From: Jan Timpe Date: Wed, 17 Jul 2024 09:01:27 -0400 Subject: [PATCH] remove extraneous item names --- tdrs-backend/tdpservice/data_files/test/test_api.py | 7 +++---- tdrs-backend/tdpservice/parsers/test/test_validators.py | 2 +- tdrs-backend/tdpservice/parsers/validators.py | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tdrs-backend/tdpservice/data_files/test/test_api.py b/tdrs-backend/tdpservice/data_files/test/test_api.py index 58ed6363c..55dba626e 100644 --- a/tdrs-backend/tdpservice/data_files/test/test_api.py +++ b/tdrs-backend/tdpservice/data_files/test/test_api.py @@ -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." ) @@ -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 diff --git a/tdrs-backend/tdpservice/parsers/test/test_validators.py b/tdrs-backend/tdpservice/parsers/test/test_validators.py index c39ff545b..d729efc6e 100644 --- a/tdrs-backend/tdpservice/parsers/test/test_validators.py +++ b/tdrs-backend/tdpservice/parsers/test/test_validators.py @@ -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']) diff --git a/tdrs-backend/tdpservice/parsers/validators.py b/tdrs-backend/tdpservice/parsers/validators.py index 5e617c8c7..53726ee4c 100644 --- a/tdrs-backend/tdpservice/parsers/validators.py +++ b/tdrs-backend/tdpservice/parsers/validators.py @@ -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