Skip to content

Commit db718bb

Browse files
committed
fix: tests
1 parent a0770a5 commit db718bb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: tests/functional/event_handler/test_bedrock_agent.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from typing import Any, Dict
33

44
from aws_lambda_powertools.event_handler import BedrockAgentResolver, Response, content_types
5+
from aws_lambda_powertools.event_handler.openapi.types import PYDANTIC_V2
56
from aws_lambda_powertools.utilities.data_classes import BedrockAgentEvent
67
from tests.functional.utils import load_event
78

@@ -99,7 +100,10 @@ def claims() -> Dict[str, Any]:
99100
assert result["response"]["httpStatusCode"] == 422
100101

101102
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
103107

104108

105109
def test_bedrock_agent_event_with_exception():

0 commit comments

Comments
 (0)