Skip to content

Commit

Permalink
- Updated validators based on new coding instructions
Browse files Browse the repository at this point in the history
- Updated test
  • Loading branch information
elipe17 committed Nov 20, 2024
1 parent dd5ea65 commit a3a6919
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/parsers/schema_defs/ssp/m2.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@
startIndex=48,
endIndex=49,
required=False,
validators=[category2.isGreaterThan(0)]
validators=[category2.isGreaterThan(0, inclusive=True)]
),
Field(
item="32E",
Expand Down
6 changes: 3 additions & 3 deletions tdrs-backend/tdpservice/parsers/schema_defs/tanf/t1.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
),
category3.ifThenAlso(
condition_field_name="SANC_REDUCTION_AMT",
condition_function=category3.isGreaterThan(0),
condition_function=category3.isGreaterThan(0, inclusive=True),
result_field_name="FAMILY_SANC_ADULT",
result_function=category3.isOneOf((1, 2)),
),
Expand Down Expand Up @@ -635,7 +635,7 @@
endIndex=114,
required=False,
validators=[
category2.isOneOf(["9", " "]),
category2.isOneOf(["9", "0", " "]),
category2.isAlphaNumeric(),
],
),
Expand All @@ -658,7 +658,7 @@
endIndex=117,
required=False,
validators=[
category2.isOneOf([1, 2]),
category2.isOneOf([0, 1, 2]),
],
),
Field(
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/parsers/test/test_parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ def test_parse_tanf_section1_blanks_file(tanf_section1_file_with_blanks, dfs):

parser_errors = ParserError.objects.filter(file=tanf_section1_file_with_blanks)

assert parser_errors.count() == 22
assert parser_errors.count() == 23

# Should only be cat3 validator errors
for error in parser_errors:
Expand Down

0 comments on commit a3a6919

Please sign in to comment.