@@ -1163,11 +1163,13 @@ def test_sign_mov_video_file_single(self):
11631163 self .assertNotIn ("validation_status" , json_data )
11641164 output .close ()
11651165
1166- def test_sign_file (self ):
1166+ def test_sign_file_tmn_wip (self ):
11671167 temp_dir = tempfile .mkdtemp ()
11681168 try :
11691169 # Create a temporary output file path
11701170 output_path = os .path .join (temp_dir , "signed_output.jpg" )
1171+ print (f"## output_path: { output_path } " )
1172+ print (f"## self.testPath: { self .testPath } " )
11711173
11721174 # Use the sign_file method
11731175 builder = Builder (self .manifestDefinition )
@@ -2284,7 +2286,7 @@ def test_sign_file_callback_signer(self):
22842286 finally :
22852287 shutil .rmtree (temp_dir )
22862288
2287- def test_sign_file_callback_signer_managed (self ):
2289+ def test_sign_file_callback_signer_managed_single (self ):
22882290 """Test signing a file using the sign_file method with context managers."""
22892291
22902292 temp_dir = tempfile .mkdtemp ()
@@ -2312,20 +2314,21 @@ def test_sign_file_callback_signer_managed(self):
23122314 self .assertGreater (len (manifest_bytes ), 0 )
23132315
23142316 # Verify signed data can be read
2315- with open (output_path , "rb" ) as file , Reader ("image/jpeg" , file ) as reader :
2316- json_data = reader .json ()
2317- self .assertIn ("Python Test" , json_data )
2318- self .assertNotIn ("validation_status" , json_data )
2317+ with open (output_path , "rb" ) as file :
2318+ with Reader ("image/jpeg" , file ) as reader :
2319+ json_data = reader .json ()
2320+ self .assertIn ("Python Test" , json_data )
2321+ self .assertNotIn ("validation_status" , json_data )
23192322
2320- # Parse the JSON and verify the signature algorithm
2321- manifest_data = json .loads (json_data )
2322- active_manifest_id = manifest_data ["active_manifest" ]
2323- active_manifest = manifest_data ["manifests" ][active_manifest_id ]
2323+ # Parse the JSON and verify the signature algorithm
2324+ manifest_data = json .loads (json_data )
2325+ active_manifest_id = manifest_data ["active_manifest" ]
2326+ active_manifest = manifest_data ["manifests" ][active_manifest_id ]
23242327
2325- # Verify the signature_info contains the correct algorithm
2326- self .assertIn ("signature_info" , active_manifest )
2327- signature_info = active_manifest ["signature_info" ]
2328- self .assertEqual (signature_info ["alg" ], self .callback_signer_alg )
2328+ # Verify the signature_info contains the correct algorithm
2329+ self .assertIn ("signature_info" , active_manifest )
2330+ signature_info = active_manifest ["signature_info" ]
2331+ self .assertEqual (signature_info ["alg" ], self .callback_signer_alg )
23292332
23302333 finally :
23312334 shutil .rmtree (temp_dir )
0 commit comments