Skip to content

Commit

Permalink
Fixed the unit tests
Browse files Browse the repository at this point in the history
Working on the Patient Mobility Unit tests
  • Loading branch information
Yuandjom committed Jan 12, 2025
1 parent 3b3342c commit 2822864
Show file tree
Hide file tree
Showing 7 changed files with 214 additions and 200 deletions.
Binary file added tests/test.txt
Binary file not shown.
4 changes: 3 additions & 1 deletion tests/test_allergy_reaction_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
@mock.patch("app.models.patient_doctor_note_model.PatientDoctorNote") # Mock PatientDoctorNote
@mock.patch("app.models.patient_photo_model.PatientPhoto") # Mock PatientPhoto
@mock.patch("app.crud.patient_assigned_dementia_list_crud.PatientAssignedDementiaList")
@mock.patch("app.models.patient_mobility_model.PatientMobility") # Mock PatientMobility
@mock.patch("app.models.patient_mobility_list_model.PatientMobilityList") # Mock PatientMobilitylist
@mock.patch("app.models.patient_mobility_mapping_model.PatientMobility") # Mock PatientMobility
@mock.patch("app.models.patient_prescription_model.PatientPrescription") # Add this line to mock PatientPrescription
@mock.patch("app.models.patient_social_history_model.PatientSocialHistory")
@mock.patch("app.models.patient_vital_model.PatientVital")
Expand All @@ -31,6 +32,7 @@ def test_create_reaction_type(
mock_patient_photo, # Add new mocks here
mock_patient_assigned_dementia_list, # Add new mocks here
mock_patient_mobility, # Add new mocks here
mock_patient_mobility_list, # Add new mocks here
mock_patient_prescription, # Add this mock
mock_patient_social_history,
mock_patient_vital,
Expand Down
4 changes: 3 additions & 1 deletion tests/test_patient_assigned_dementia_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ def get_mock_dementia_list_entry():
@mock.patch("app.models.patient_allergy_mapping_model.PatientAllergyMapping")
@mock.patch("app.models.patient_doctor_note_model.PatientDoctorNote") # Mock PatientDoctorNote
@mock.patch("app.models.patient_photo_model.PatientPhoto") # Mock PatientPhoto
@mock.patch("app.models.patient_mobility_model.PatientMobility")
@mock.patch("app.models.patient_mobility_list_model.PatientMobilityList") # Mock PatientMobilityList
@mock.patch("app.models.patient_mobility_mapping_model.PatientMobility") # Mock PatientMobility
@mock.patch("app.models.patient_prescription_model.PatientPrescription")
@mock.patch("app.models.patient_social_history_model.PatientSocialHistory")
@mock.patch("app.models.patient_vital_model.PatientVital")
Expand All @@ -57,6 +58,7 @@ def test_get_all_dementia_list_entries(
mock_doctor_note_model,
mock_photo_model,
mock_mobility_model,
mock_mobility_model_list,
mock_prescription_model,
mock_social_history_model,
mock_vital_model,
Expand Down
4 changes: 3 additions & 1 deletion tests/test_patient_assigned_dementia_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def get_mock_assigned_dementias():
@mock.patch("app.models.patient_highlight_model.PatientHighlight")
@mock.patch("app.models.patient_vital_model.PatientVital")
@mock.patch("app.models.patient_prescription_model.PatientPrescription")
@mock.patch("app.models.patient_mobility_model.PatientMobility")
@mock.patch("app.models.patient_mobility_list_model.PatientMobilityList") # Mock PatientMobilityList
@mock.patch("app.models.patient_mobility_mapping_model.PatientMobility") # Mock PatientMobility
@mock.patch("app.models.patient_photo_model.PatientPhoto")
@mock.patch("app.models.patient_doctor_note_model.PatientDoctorNote")
@mock.patch("app.models.patient_allergy_mapping_model.PatientAllergyMapping")
Expand All @@ -89,6 +90,7 @@ def test_create_assigned_dementia(
mock_patient_vital,
mock_patient_prescription,
mock_patient_mobility,
mock_patient_mobility_list,
mock_patient_photo,
mock_patient_doctor_note,
mock_patient_allergy_mapping,
Expand Down
4 changes: 3 additions & 1 deletion tests/test_patient_prescription.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ def db_session_mock():
@mock.patch("app.models.patient_doctor_note_model.PatientDoctorNote")
@mock.patch("app.models.patient_photo_model.PatientPhoto")
@mock.patch("app.models.patient_assigned_dementia_list_model.PatientAssignedDementiaList")
@mock.patch("app.models.patient_mobility_model.PatientMobility")
@mock.patch("app.models.patient_mobility_list_model.PatientMobilityList") # Mock PatientMobility
@mock.patch("app.models.patient_mobility_mapping_model.PatientMobility") # Mock PatientMobility
@mock.patch("app.models.patient_prescription_list_model.PatientPrescriptionList")
@mock.patch("app.models.patient_prescription_model.PatientPrescription")
@mock.patch("app.models.patient_social_history_model.PatientSocialHistory")
Expand All @@ -100,6 +101,7 @@ def test_create_prescription(
mock_patient_photo,
mock_patient_assigned_dementia_list,
mock_patient_mobility,
mock_patient_mobility_list,
mock_patient_prescription_list,
mock_patient_prescription,
mock_patient_vital,
Expand Down
Loading

0 comments on commit 2822864

Please sign in to comment.