1
- from __future__ import annotations
2
-
3
1
import json
4
- from typing import Any
2
+ from typing import Any , Dict , Optional
5
3
6
4
import pytest
7
5
from typing_extensions import Annotated
@@ -19,7 +17,7 @@ def test_bedrock_agent_event():
19
17
app = BedrockAgentResolver ()
20
18
21
19
@app .get ("/claims" , description = "Gets claims" )
22
- def claims () -> dict [str , Any ]:
20
+ def claims () -> Dict [str , Any ]:
23
21
assert isinstance (app .current_event , BedrockAgentEvent )
24
22
assert app .lambda_context == {}
25
23
return {"output" : claims_response }
@@ -112,7 +110,7 @@ def test_bedrock_agent_event_with_validation_error():
112
110
app = BedrockAgentResolver ()
113
111
114
112
@app .get ("/claims" , description = "Gets claims" )
115
- def claims () -> dict [str , Any ]:
113
+ def claims () -> Dict [str , Any ]:
116
114
return "oh no, this is not a dict" # type: ignore
117
115
118
116
# WHEN calling the event handler
@@ -193,7 +191,7 @@ def test_openapi_schema_for_pydanticv2(openapi30_schema):
193
191
194
192
# WHEN we have a simple handler
195
193
@app .get ("/" , description = "Testing" )
196
- def handler () -> dict | None :
194
+ def handler () -> Optional [ Dict ] :
197
195
pass
198
196
199
197
# WHEN we get the schema
0 commit comments