@@ -42,7 +42,7 @@ def tearDown(self):
4242 super ().tearDown ()
4343
4444
45- class TestGetImmunizationByIdentifier (TestFhirRepository ):
45+ class TestGetImmunizationByIdentifier (TestFhirRepositoryBase ):
4646 def setUp (self ):
4747 super ().setUp ()
4848 self .table = MagicMock ()
@@ -170,12 +170,17 @@ def _make_a_patient(nhs_number="1234567890") -> dict:
170170 }
171171
172172
173- class TestCreateImmunizationMainIndex (unittest . TestCase ):
173+ class TestCreateImmunizationMainIndex (TestFhirRepositoryBase ):
174174 def setUp (self ):
175+ super ().setUp ()
175176 self .table = MagicMock ()
176177 self .repository = ImmunizationRepository (table = self .table )
177178 self .patient = {"id" : "a-patient-id" , "identifier" : {"value" : "an-identifier" }}
178179
180+ def tearDown (self ):
181+ patch .stopall ()
182+ super ().tearDown ()
183+
179184 def test_create_immunization (self ):
180185 """it should create Immunization, and return created object"""
181186 imms = create_covid_19_immunization_dict (imms_id = "an-id" )
@@ -355,7 +360,7 @@ def test_create_patient_with_unauthorised_vaccine_type_permissions(self):
355360 self .repository .create_immunization (imms , self .patient , "COVID:create" , "Test" )
356361
357362
358- class TestUpdateImmunization (TestFhirRepository ):
363+ class TestUpdateImmunization (TestFhirRepositoryBase ):
359364 def setUp (self ):
360365 super ().setUp ()
361366 self .table = MagicMock ()
@@ -678,7 +683,7 @@ def test_bad_response_from_dynamo(self):
678683 self .assertDictEqual (e .exception .response , response )
679684
680685
681- class TestImmunizationDecimals (TestFhirRepository ):
686+ class TestImmunizationDecimals (TestFhirRepositoryBase ):
682687 """It should create a record and keep decimal precision"""
683688
684689 def setUp (self ):
0 commit comments