@@ -1605,18 +1605,9 @@ def test_immunization_unhandled_error(self, mock_get_supplier_permissions):
16051605 self .assertEqual (body ["issue" ][0 ]["code" ], "exception" )
16061606
16071607class TestSearchImmunizations (TestFhirControllerBase ):
1608- MOCK_REDIS_V2D_RESPONSE = {
1609- "PERTUSSIS" : "[{\" code\" : \" 27836007\" , \" term\" : \" Pertussis (disorder)\" }]" ,
1610- "RSV" : "[{\" code\" : \" 55735004\" , \" term\" : \" Respiratory syncytial virus infection (disorder)\" }]" ,
1611- "3in1" : "[{\" code\" : \" 398102009\" , \" term\" : \" Acute poliomyelitis\" }, {\" code\" : \" 397430003\" , \" term\" : \" Diphtheria caused by Corynebacterium diphtheriae\" }, {\" code\" : \" 76902006\" , \" term\" : \" Tetanus (disorder)\" }]" ,
1612- "MMR" : "[{\" code\" : \" 14189004\" , \" term\" : \" Measles (disorder)\" }, {\" code\" : \" 36989005\" , \" term\" : \" Mumps (disorder)\" }, {\" code\" : \" 36653000\" , \" term\" : \" Rubella (disorder)\" }]" ,
1613- "HPV" : "[{\" code\" : \" 240532009\" , \" term\" : \" Human papillomavirus infection\" }]" ,
1614- "MMRV" : "[{\" code\" : \" 14189004\" , \" term\" : \" Measles (disorder)\" }, {\" code\" : \" 36989005\" , \" term\" : \" Mumps (disorder)\" }, {\" code\" : \" 36653000\" , \" term\" : \" Rubella (disorder)\" }, {\" code\" : \" 38907003\" , \" term\" : \" Varicella (disorder)\" }]" ,
1615- "PCV13" : "[{\" code\" : \" 16814004\" , \" term\" : \" Pneumococcal infectious disease\" }]" ,
1616- "SHINGLES" : "[{\" code\" : \" 4740000\" , \" term\" : \" Herpes zoster\" }]" ,
1617- "COVID19" : "[{\" code\" : \" 840539006\" , \" term\" : \" Disease caused by severe acute respiratory syndrome coronavirus 2\" }]" ,
1618- "FLU" : "[{\" code\" : \" 6142004\" , \" term\" : \" Influenza caused by seasonal influenza virus (disorder)\" }]" ,
1619- "MENACWY" : "[{\" code\" : \" 23511006\" , \" term\" : \" Meningococcal infectious disease\" }]"
1608+ MOCK_REDIS_V2D_HKEYS = {
1609+ "PERTUSSIS" , "RSV" , "3in1" , "MMR" , "HPV" , "MMRV" , "PCV13" ,
1610+ "SHINGLES" , "COVID19" , "FLU" , "MENACWY"
16201611 }
16211612 def setUp (self ):
16221613 super ().setUp ()
@@ -1629,7 +1620,7 @@ def setUp(self):
16291620 self .date_to_key = "-date.to"
16301621 self .nhs_number_valid_value = "9000000009"
16311622 self .patient_identifier_valid_value = f"{ patient_identifier_system } |{ self .nhs_number_valid_value } "
1632- self .mock_redis_client .hkeys .return_value = self .MOCK_REDIS_V2D_RESPONSE
1623+ self .mock_redis_client .hkeys .return_value = self .MOCK_REDIS_V2D_HKEYS
16331624
16341625 def tearDown (self ):
16351626 return super ().tearDown ()
@@ -1930,7 +1921,7 @@ def test_post_search_immunizations_for_unauthorized_vaccine_type_search_403(self
19301921
19311922 @patch ("fhir_controller.process_search_params" , wraps = process_search_params )
19321923 def test_uses_parameter_parser (self , process_search_params : Mock ):
1933- self .mock_redis_client .hkeys .return_value = self .MOCK_REDIS_V2D_RESPONSE
1924+ self .mock_redis_client .hkeys .return_value = self .MOCK_REDIS_V2D_HKEYS
19341925 lambda_event = {
19351926 "multiValueQueryStringParameters" : {
19361927 self .patient_identifier_key : ["https://fhir.nhs.uk/Id/nhs-number|9000000009" ],
0 commit comments