@@ -76,6 +76,8 @@ def _verify_assertion_params(self, mock_jwt_creator_class, expected_algorithm,
7676 if expected_thumbprint_type == 'sha256' :
7777 self .assertIn ('sha256_thumbprint' , call_args [1 ])
7878 self .assertNotIn ('sha1_thumbprint' , call_args [1 ])
79+ if expected_thumbprint_value :
80+ self .assertEqual (call_args [1 ]['sha256_thumbprint' ], expected_thumbprint_value )
7981 elif expected_thumbprint_type == 'sha1' :
8082 self .assertIn ('sha1_thumbprint' , call_args [1 ])
8183 self .assertNotIn ('sha256_thumbprint' , call_args [1 ])
@@ -233,7 +235,8 @@ def test_pem_with_thumbprint_sha256_only_uses_sha256(
233235 self ._verify_assertion_params (
234236 mock_jwt_creator_class ,
235237 expected_algorithm = 'PS256' ,
236- expected_thumbprint_type = 'sha256'
238+ expected_thumbprint_type = 'sha256' ,
239+ expected_thumbprint_value = self .test_sha256_thumbprint
237240 )
238241
239242 def test_pem_with_both_thumbprints_aad_uses_sha256 (
@@ -257,7 +260,8 @@ def test_pem_with_both_thumbprints_aad_uses_sha256(
257260 self ._verify_assertion_params (
258261 mock_jwt_creator_class ,
259262 expected_algorithm = 'PS256' ,
260- expected_thumbprint_type = 'sha256'
263+ expected_thumbprint_type = 'sha256' ,
264+ expected_thumbprint_value = self .test_sha256_thumbprint
261265 )
262266
263267 def test_pem_with_both_thumbprints_adfs_uses_sha1 (
@@ -309,7 +313,8 @@ def test_pem_with_both_thumbprints_b2c_uses_sha256(
309313 self ._verify_assertion_params (
310314 mock_jwt_creator_class ,
311315 expected_algorithm = 'PS256' ,
312- expected_thumbprint_type = 'sha256'
316+ expected_thumbprint_type = 'sha256' ,
317+ expected_thumbprint_value = self .test_sha256_thumbprint
313318 )
314319
315320 def test_pem_with_both_thumbprints_ciam_uses_sha256 (
@@ -333,7 +338,8 @@ def test_pem_with_both_thumbprints_ciam_uses_sha256(
333338 self ._verify_assertion_params (
334339 mock_jwt_creator_class ,
335340 expected_algorithm = 'PS256' ,
336- expected_thumbprint_type = 'sha256'
341+ expected_thumbprint_type = 'sha256' ,
342+ expected_thumbprint_value = self .test_sha256_thumbprint
337343 )
338344
339345 def test_pem_with_both_thumbprints_generic_uses_sha1 (
0 commit comments