4545
4646def test_handler_initialization ():
4747
48- ps = PresentationSubmissionHandler (trust_evaluator = trust_ev , config = mock_format_config )
48+ ps = PresentationSubmissionHandler (
49+ trust_evaluator = trust_ev ,
50+ config = mock_format_config ,
51+ sig_alg_supported = ["ES256" , "ES384" , "ES512" ]
52+ )
4953
5054 assert len (ps .handlers ) == 3 , "Not all handlers were created."
5155
@@ -54,7 +58,11 @@ def test_handler_initialization():
5458 assert isinstance (ps .handlers ["fail_parser" ], MockFailingParser ), "Handler for 'fail_parser' format is incorrect."
5559
5660def test_handler_correct_parsing ():
57- ps = PresentationSubmissionHandler (trust_evaluator = trust_ev , config = mock_format_config )
61+ ps = PresentationSubmissionHandler (
62+ trust_evaluator = trust_ev ,
63+ config = mock_format_config ,
64+ sig_alg_supported = ["ES256" , "ES384" , "ES512" ]
65+ )
5866
5967 parsed_tokens = ps .parse (valid_submission , ["vp_token_1" , "vp_token_2" ])
6068
@@ -63,7 +71,10 @@ def test_handler_correct_parsing():
6371 assert parsed_tokens [1 ] == {"parsed" : "vp_token_2" }, "Token 2 was not parsed correctly."
6472
6573def test_handler_missing_handler ():
66- ps = PresentationSubmissionHandler (trust_evaluator = trust_ev , config = mock_format_config )
74+ ps = PresentationSubmissionHandler (
75+ trust_evaluator = trust_ev ,
76+ config = mock_format_config ,
77+ sig_alg_supported = ["ES256" , "ES384" , "ES512" ])
6778
6879 invalid_submission = {
6980 "id" : "submission_id" ,
@@ -81,7 +92,11 @@ def test_handler_missing_handler():
8192 assert str (e ) == "Handler for format 'non_existent_format' not found." , "Incorrect exception message."
8293
8394def test_handler_invalid_path ():
84- ps = PresentationSubmissionHandler (trust_evaluator = trust_ev , config = mock_format_config )
95+ ps = PresentationSubmissionHandler (
96+ trust_evaluator = trust_ev ,
97+ config = mock_format_config ,
98+ sig_alg_supported = ["ES256" , "ES384" , "ES512" ]
99+ )
85100
86101 invalid_submission = {
87102 "id" : "submission_id" ,
@@ -99,7 +114,11 @@ def test_handler_invalid_path():
99114 assert str (e ) == "Invalid path format: invalid_path" , "Incorrect exception message."
100115
101116def test_handler_mismatched_tokens ():
102- ps = PresentationSubmissionHandler (trust_evaluator = trust_ev , config = mock_format_config )
117+ ps = PresentationSubmissionHandler (
118+ trust_evaluator = trust_ev ,
119+ config = mock_format_config ,
120+ sig_alg_supported = ["ES256" , "ES384" , "ES512" ]
121+ )
103122
104123 invalid_submission = {
105124 "id" : "submission_id" ,
@@ -116,7 +135,11 @@ def test_handler_mismatched_tokens():
116135 assert str (e ) == "Number of VP tokens (1) does not match the number of descriptors (2)." , "Incorrect exception message."
117136
118137def test_handler_invalid_submission ():
119- ps = PresentationSubmissionHandler (trust_evaluator = trust_ev , config = mock_format_config )
138+ ps = PresentationSubmissionHandler (
139+ trust_evaluator = trust_ev ,
140+ config = mock_format_config ,
141+ sig_alg_supported = ["ES256" , "ES384" , "ES512" ]
142+ )
120143
121144 invalid_submission = {
122145 "fail" : "submission"
@@ -130,7 +153,11 @@ def test_handler_invalid_submission():
130153 assert False , f"Incorrect exception type: { type (e )} "
131154
132155def test_handler_parser_failure ():
133- ps = PresentationSubmissionHandler (trust_evaluator = trust_ev , config = mock_format_config )
156+ ps = PresentationSubmissionHandler (
157+ trust_evaluator = trust_ev ,
158+ config = mock_format_config ,
159+ sig_alg_supported = ["ES256" , "ES384" , "ES512" ]
160+ )
134161
135162 invalid_submission = {
136163 "id" : "submission_id" ,
0 commit comments