@@ -112,7 +112,7 @@ def test_get_imms_by_identifer(self, mock_get_permissions):
112112 # Then
113113 mock_get_permissions .assert_called_once_with ("test" )
114114 self .service .get_immunization_by_identifier .assert_called_once_with (
115- identifiers , [ "COVID19.CUDS" ] , identifier , _element
115+ identifiers , "test" , identifier , _element
116116 )
117117
118118 self .assertEqual (response ["statusCode" ], 200 )
@@ -187,7 +187,7 @@ def test_not_found_for_identifier(self, mock_get_permissions):
187187 # Then
188188 mock_get_permissions .assert_called_once_with ("test" )
189189 self .service .get_immunization_by_identifier .assert_called_once_with (
190- imms , [ "COVID19.S" ] , identifier , _element
190+ imms , "test" , identifier , _element
191191 )
192192
193193 self .assertEqual (response ["statusCode" ], 200 )
@@ -460,7 +460,7 @@ def test_validate_imms_id_invalid_vaccinetype(self, mock_get_permissions):
460460 # Then
461461 mock_get_permissions .assert_called_once_with ("test" )
462462 self .service .get_immunization_by_identifier .assert_called_once_with (
463- identifiers , [ "COVID19.CRUDS" ] , identifier , _element
463+ identifiers , "test" , identifier , _element
464464 )
465465
466466 self .assertEqual (response ["statusCode" ], 403 )
@@ -510,7 +510,7 @@ def test_get_imms_by_identifier(self,mock_get_permissions):
510510 # Then
511511 mock_get_permissions .assert_called_once_with ("test" )
512512 self .service .get_immunization_by_identifier .assert_called_once_with (
513- identifiers , [ "COVID19.CRUDS" ] , converted_identifier , converted_element
513+ identifiers , "test" , converted_identifier , converted_element
514514 )
515515 self .assertEqual (response ["statusCode" ], 200 )
516516 body = json .loads (response ["body" ])
@@ -543,7 +543,7 @@ def test_not_found_for_identifier(self, mock_get_permissions):
543543 # Then
544544 mock_get_permissions .assert_called_once_with ("test" )
545545 self .service .get_immunization_by_identifier .assert_called_once_with (
546- identifiers , [ "COVID19.CRUDS" ] , converted_identifier , converted_element
546+ identifiers , "test" , converted_identifier , converted_element
547547 )
548548 self .assertEqual (response ["statusCode" ], 200 )
549549 body = json .loads (response ["body" ])
@@ -779,7 +779,7 @@ def test_validate_imms_id_invalid_vaccinetype(self, mock_get_permissions):
779779 # Then
780780 mock_get_permissions .assert_called_once_with ("test" )
781781 self .service .get_immunization_by_identifier .assert_called_once_with (
782- identifiers , [ "COVID19.CRUDS" ] , converted_identifer , converted_element
782+ identifiers , "test" , converted_identifer , converted_element
783783 )
784784
785785 self .assertEqual (response ["statusCode" ], 403 )
@@ -893,10 +893,10 @@ def setUp(self):
893893 self .controller = FhirController (self .authorizer , self .service )
894894 self .logger_info_patcher = patch ("logging.Logger.info" )
895895 self .mock_logger_info = self .logger_info_patcher .start ()
896-
896+
897897 def tearDown (self ):
898898 patch .stopall ()
899-
899+
900900 @patch ("fhir_controller.get_supplier_permissions" )
901901 def test_create_immunization (self ,mock_get_permissions ):
902902 """it should create Immunization and return resource's location"""
@@ -1050,7 +1050,7 @@ def setUp(self):
10501050 self .controller = FhirController (self .authorizer , self .service )
10511051 self .logger_info_patcher = patch ("logging.Logger.info" )
10521052 self .mock_logger_info = self .logger_info_patcher .start ()
1053-
1053+
10541054 def tearDown (self ):
10551055 patch .stopall ()
10561056
@@ -1495,7 +1495,7 @@ def test_update_immunization_for_batch_with_invalid_json(self, mock_get_supplier
14951495 self .assertEqual (response ["statusCode" ], 400 )
14961496 outcome = json .loads (response ["body" ])
14971497 self .assertEqual (outcome ["resourceType" ], "OperationOutcome" )
1498-
1498+
14991499 @patch ("fhir_controller.get_supplier_permissions" )
15001500 def test_update_immunization_when_reinstated_true (self , mock_get_permissions ):
15011501 """it should update reinstated Immunization"""
@@ -1533,7 +1533,7 @@ def test_update_immunization_missing_id(self):
15331533 }
15341534 with self .assertRaises (KeyError ):
15351535 self .controller .update_immunization (aws_event )
1536-
1536+
15371537 @patch ("fhir_controller.get_supplier_permissions" )
15381538 def test_update_reinstated_immunization_with_diagnostics_error (self , mock_get_permissions ):
15391539 """it should return 400 if patient validation error is present"""
@@ -1570,10 +1570,10 @@ def setUp(self):
15701570 self .controller = FhirController (self .authorizer , self .service )
15711571 self .logger_info_patcher = patch ("logging.Logger.info" )
15721572 self .mock_logger_info = self .logger_info_patcher .start ()
1573-
1573+
15741574 def tearDown (self ):
15751575 patch .stopall ()
1576-
1576+
15771577 def test_validate_imms_id (self ):
15781578 """it should validate lambda's Immunization id"""
15791579 invalid_id = {"pathParameters" : {"id" : "invalid %$ id" }, "headers" : {"SupplierSystem" : "Test" }}
0 commit comments