Skip to content

Commit

Permalink
Selenium - report generator (#3737)
Browse files Browse the repository at this point in the history
* Added report generation pytest-html

* Updated poetry.lock

* poetry

* add pop default None

---------

Co-authored-by: Maciej Szewczyk <[email protected]>
Co-authored-by: Pavlo Mokiichuk <[email protected]>
  • Loading branch information
3 people authored Apr 3, 2024
1 parent 50c13af commit 3572ea3
Show file tree
Hide file tree
Showing 11 changed files with 446 additions and 158 deletions.
3 changes: 2 additions & 1 deletion backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
Makefile
*.isorted
test_times.txt
screenshot
screenshot
report
2 changes: 1 addition & 1 deletion backend/hct_mis_api/api/endpoints/rdi/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def perform_create(self, serializer: serializers.BaseSerializer) -> None:
obj: RegistrationDataImportDatahub = serializer.save(
business_area_slug=self.selected_business_area.slug, import_done=RegistrationDataImportDatahub.LOADING
)
serializer.validated_data.pop("import_done")
serializer.validated_data.pop("import_done", None)
self.rdi: RegistrationDataImport = RegistrationDataImport.objects.create(
**serializer.validated_data,
status=RegistrationDataImport.LOADING,
Expand Down
2 changes: 1 addition & 1 deletion backend/hct_mis_api/api/endpoints/rdi/push_people.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _create_individual(
individual_fields = [field.name for field in ImportedIndividual._meta.get_fields()]
individual_data = {field: value for field, value in person_data.items() if field in individual_fields}
person_type = person_data.get("type")
individual_data.pop("relationship")
individual_data.pop("relationship", None)
relationship = NON_BENEFICIARY if person_type is NON_BENEFICIARY else HEAD

ind = ImportedIndividual.objects.create(
Expand Down
2 changes: 1 addition & 1 deletion backend/hct_mis_api/api/endpoints/rdi/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def create(self, validated_data: Dict) -> Dict:
**validated_data, business_area_slug=self.business_area.slug
)
info = self.save_households(rdi_datahub, program.id, households)
validated_data.pop("import_done")
validated_data.pop("import_done", None)
rdi_mis = RegistrationDataImport.objects.create(
**validated_data,
imported_by=created_by,
Expand Down
2 changes: 1 addition & 1 deletion backend/hct_mis_api/api/endpoints/rdi/upload_people.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def create(self, validated_data: Dict) -> Dict:
rdi_datahub = RegistrationDataImportDatahub.objects.create(
**validated_data, business_area_slug=self.business_area.slug
)
validated_data.pop("import_done")
validated_data.pop("import_done", None)
rdi_mis = RegistrationDataImport.objects.create(
**validated_data,
imported_by=created_by,
Expand Down
Loading

0 comments on commit 3572ea3

Please sign in to comment.