File tree 1 file changed +5
-1
lines changed
tests/functional/event_handler
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2
2
from typing import Any , Dict
3
3
4
4
from aws_lambda_powertools .event_handler import BedrockAgentResolver , Response , content_types
5
+ from aws_lambda_powertools .event_handler .openapi .types import PYDANTIC_V2
5
6
from aws_lambda_powertools .utilities .data_classes import BedrockAgentEvent
6
7
from tests .functional .utils import load_event
7
8
@@ -99,7 +100,10 @@ def claims() -> Dict[str, Any]:
99
100
assert result ["response" ]["httpStatusCode" ] == 422
100
101
101
102
body = result ["response" ]["responseBody" ]["application/json" ]["body" ]
102
- assert "value is not a valid dict" in body
103
+ if PYDANTIC_V2 :
104
+ assert "should be a valid dictionary" in body
105
+ else :
106
+ assert "value is not a valid dict" in body
103
107
104
108
105
109
def test_bedrock_agent_event_with_exception ():
You can’t perform that action at this time.
0 commit comments