Skip to content

Commit

Permalink
fix more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pkujawa committed Dec 19, 2024
1 parent 2b87e59 commit 6221b0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unit/apps/registration_datahub/test_rdi_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,18 +447,21 @@ def test_merge_rdi_create_collections(self, household_representation_exists: boo
if False, another household representation exists, but it does not have collection,
if None, household representation does not exist in another program
"""
program_2 = ProgramFactory(business_area=self.rdi.business_area)
self.rdi.data_source = RegistrationDataImport.PROGRAM_POPULATION
self.rdi.save()
imported_household = HouseholdFactory(
collect_individual_data=COLLECT_TYPE_FULL,
registration_data_import=self.rdi,
unicef_id="HH-9",
rdi_merge_status=MergeStatusModel.PENDING,
program=self.rdi.program,
)
self.set_imported_individuals(imported_household)
individual_without_collection = IndividualFactory(
unicef_id="IND-9",
business_area=self.rdi.business_area,
program=program_2,
household=None,
)
individual_without_collection.individual_collection = None
Expand All @@ -468,6 +471,7 @@ def test_merge_rdi_create_collections(self, household_representation_exists: boo
IndividualFactory(
unicef_id="IND-8",
business_area=self.rdi.business_area,
program=program_2,
individual_collection=individual_collection,
household=None,
)
Expand All @@ -477,6 +481,7 @@ def test_merge_rdi_create_collections(self, household_representation_exists: boo
household = HouseholdFactory(
head_of_household=individual_without_collection,
business_area=self.rdi.business_area,
program=program_2,
unicef_id="HH-9",
)
household.household_collection = None
Expand Down

0 comments on commit 6221b0a

Please sign in to comment.