@@ -40,8 +40,9 @@ def test_non_unique_identifier(self):
4040
4141 # Check that duplice CREATE request is rejected after the event is updated
4242 imms ["id" ] = imms_id # Imms fhir resource should include the id for update
43- etag_version = int (res .headers . get ( "E-Tag" , 1 ) )
43+ etag_version = int (res .headers [ "E-Tag" ] )
4444 print ("E-Tag being sent:" , etag_version )
45+ print ("Updating with headers:" , self ._update_headers ())
4546 print ("Update payload:" , json .dumps (imms , indent = 2 , default = str ))
4647 self .default_imms_api .update_immunization (imms_id , imms , headers = {"E-Tag" : str (etag_version )})
4748 self .assertEqual (res .status_code , 200 )
@@ -56,7 +57,10 @@ def test_non_unique_identifier(self):
5657
5758 # Check that duplice CREATE request is rejected after the event is updated then deleted then reinstated
5859 imms ["id" ] = imms_id # Imms fhir resource should include the id for update
59- self .default_imms_api .update_immunization (imms_id , imms )
60+ reinstated_res = self .default_imms_api .get_immunization_by_id (imms_id )
61+ etag_version = int (reinstated_res .headers ["E-Tag" ])
62+ print ("E-Tag being sent:" , etag_version )
63+ self .default_imms_api .update_immunization (imms_id , imms , headers = {"E-Tag" : str (etag_version )})
6064 res = self .default_imms_api .get_immunization_by_id (imms_id )
6165 self .assertEqual (res .status_code , 200 )
6266 del imms ["id" ] # Imms fhir resource should not include an id for create
0 commit comments