Skip to content

Commit

Permalink
Revert "- Fixed name clash on PARENT_MINOR_CHILD"
Browse files Browse the repository at this point in the history
This reverts commit 5850dc8.
  • Loading branch information
elipe17 committed Dec 29, 2023
1 parent 5850dc8 commit c15d92d
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 45 deletions.
6 changes: 3 additions & 3 deletions tdrs-backend/tdpservice/parsers/schema_defs/tanf/t2.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
validators.if_then_validator(
condition_field="FAMILY_AFFILIATION",
condition_function=validators.isInLimits(1, 2),
result_field="PARENT_MINOR_CHILD",
result_field="PARENT_WITH_MINOR_CHILD",
result_function=validators.isInLimits(1, 3),
),
validators.if_then_validator(
Expand Down Expand Up @@ -359,8 +359,8 @@
),
Field(
item="39",
name="PARENT_MINOR_CHILD",
friendly_name="parent of minor child",
name="PARENT_WITH_MINOR_CHILD",
friendly_name="parent with minor child",
type="number",
startIndex=53,
endIndex=54,
Expand Down
10 changes: 0 additions & 10 deletions tdrs-backend/tdpservice/parsers/schema_defs/test.py

This file was deleted.

4 changes: 2 additions & 2 deletions tdrs-backend/tdpservice/parsers/schema_defs/tribal_tanf/t2.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@
),
Field(
item="39",
name="PARENT_MINOR_CHILD",
friendly_name="parent of minor child",
name="PARENT_WITH_MINOR_CHILD",
friendly_name="parent with minor child",
type="number",
startIndex=53,
endIndex=54,
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/parsers/test/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class Meta:
RECEIVE_SSI = 1
MARITAL_STATUS = 1
RELATIONSHIP_HOH = "01"
PARENT_MINOR_CHILD = 1
PARENT_WITH_MINOR_CHILD = 1
NEEDS_PREGNANT_WOMAN = 1
EDUCATION_LEVEL = "01"
CITIZENSHIP_STATUS = 1
Expand Down
10 changes: 5 additions & 5 deletions tdrs-backend/tdpservice/parsers/test/test_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -587,16 +587,16 @@ def test_validate_parent_with_minor(self, record):
"""Test cat3 validator for parent with a minor child."""
val = validators.if_then_validator(
condition_field='FAMILY_AFFILIATION', condition_function=validators.isInLimits(1, 3),
result_field='PARENT_MINOR_CHILD', result_function=validators.isInLimits(1, 3),
result_field='PARENT_WITH_MINOR_CHILD', result_function=validators.isInLimits(1, 3),
)
result = val(record)
assert result == (True, None, ['FAMILY_AFFILIATION', 'PARENT_MINOR_CHILD'])
assert result == (True, None, ['FAMILY_AFFILIATION', 'PARENT_WITH_MINOR_CHILD'])

record.PARENT_MINOR_CHILD = 0
record.PARENT_WITH_MINOR_CHILD = 0
result = val(record)
assert result == (False, 'if FAMILY_AFFILIATION :1 validator1 passed then PARENT_MINOR_CHILD 0 is not ' +
assert result == (False, 'if FAMILY_AFFILIATION :1 validator1 passed then PARENT_WITH_MINOR_CHILD 0 is not ' +
'larger or equal to 1 and smaller or equal to 3.',
['FAMILY_AFFILIATION', 'PARENT_MINOR_CHILD'])
['FAMILY_AFFILIATION', 'PARENT_WITH_MINOR_CHILD'])

def test_validate_education_level(self, record):
"""Test cat3 validator for education level."""
Expand Down
2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/search_indexes/documents/tanf.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class Django:
'RECEIVE_SSI',
'MARITAL_STATUS',
'RELATIONSHIP_HOH',
'PARENT_MINOR_CHILD',
'PARENT_WITH_MINOR_CHILD',
'NEEDS_PREGNANT_WOMAN',
'EDUCATION_LEVEL',
'CITIZENSHIP_STATUS',
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion tdrs-backend/tdpservice/search_indexes/models/tanf.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class TANF_T2(models.Model):
RECEIVE_SSI = models.IntegerField(null=True, blank=False)
MARITAL_STATUS = models.IntegerField(null=True, blank=False)
RELATIONSHIP_HOH = models.CharField(max_length=2, null=True, blank=False)
PARENT_MINOR_CHILD = models.IntegerField(null=True, blank=False)
PARENT_WITH_MINOR_CHILD = models.IntegerField(null=True, blank=False)
NEEDS_PREGNANT_WOMAN = models.IntegerField(null=True, blank=False)
EDUCATION_LEVEL = models.CharField(max_length=2, null=True, blank=False)
CITIZENSHIP_STATUS = models.IntegerField(null=True, blank=False)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_can_create_and_index_tanf_t2_submission(test_datafile):
submission.RECEIVE_SSI = 1
submission.MARITAL_STATUS = 1
submission.RELATIONSHIP_HOH = "01"
submission.PARENT_MINOR_CHILD = 1
submission.PARENT_WITH_MINOR_CHILD = 1
submission.NEEDS_PREGNANT_WOMAN = 1
submission.EDUCATION_LEVEL = 1
submission.CITIZENSHIP_STATUS = 1
Expand Down Expand Up @@ -273,11 +273,11 @@ def test_can_create_and_index_tanf_t5_submission(test_datafile):
submission.REC_FEDERAL_DISABILITY = 1
submission.REC_AID_TOTALLY_DISABLED = 1
submission.REC_AID_AGED_BLIND = 1
submission.REC_SSI = 1
submission.RECEIVE_SSI = 1
submission.MARITAL_STATUS = 1
submission.RELATIONSHIP_HOH = "01"
submission.PARENT_MINOR_CHILD = 1
submission.NEEDS_OF_PREGNANT_WOMAN = 1
submission.PARENT_WITH_MINOR_CHILD = 1
submission.NEEDS_PREGNANT_WOMAN = 1
submission.EDUCATION_LEVEL = "1"
submission.CITIZENSHIP_STATUS = 1
submission.COUNTABLE_MONTH_FED_TIME = "1"
Expand Down

0 comments on commit c15d92d

Please sign in to comment.