Skip to content

Commit ee89a3e

Browse files
committed
tidy
1 parent c7b3dc8 commit ee89a3e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

backend/tests/test_fhir_service.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -647,9 +647,9 @@ class TestSearchImmunizations(unittest.TestCase):
647647
"""Tests for FhirService.search_immunizations"""
648648

649649
def setUp(self):
650-
self.imms_repo = MagicMock()
650+
self.imms_repo = create_autospec(ImmunizationRepository)
651651
self.validator = create_autospec(ImmunizationValidator)
652-
self.fhir_service = FhirService(self.imms_repo, self.validator)
652+
self.fhir_service = FhirService(self.imms_repo, self.validator)
653653
self.nhs_search_param = "patient.identifier"
654654
self.vaccine_type_search_param = "-immunization.target"
655655
self.sample_patient_resource = load_json_data("bundle_patient_resource.json")
@@ -663,14 +663,12 @@ def test_vaccine_type_search(self):
663663
self.imms_repo.find_immunizations.return_value = []
664664

665665
# When
666-
result = self.fhir_service.search_immunizations(nhs_number, [vaccine_type], params)
666+
# result = self.fhir_service.search_immunizations(nhs_number, [vaccine_type], params)
667+
_ = self.fhir_service.search_immunizations(nhs_number, [vaccine_type], params)
667668

668669
# Then
669670
self.imms_repo.find_immunizations.assert_called_once_with(nhs_number, [vaccine_type])
670671

671-
self.assertEqual(result.type, "searchset")
672-
self.assertEqual(len([e for e in result.entry if e.resource.resource_type == "Immunization"]), 0)
673-
674672
def test_make_fhir_bundle_from_search_result(self):
675673
"""It should return a FHIR Bundle resource"""
676674
imms_ids = ["imms-1", "imms-2"]

0 commit comments

Comments
 (0)