You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove duplication between streaming and non streaming
19
+
"""
20
+
12
21
13
22
classTestBedrockLLM:
14
23
"""Test suite for BedrockLLM class with real API calls."""
15
24
25
+
defassert_response_successful(self, response):
26
+
"""
27
+
Utility method to verify a response is successful.
28
+
29
+
A successful response has:
30
+
- response.text is set (not None and not empty)
31
+
- response.exception is None
32
+
33
+
Args:
34
+
response: LLMResponseEvent to check
35
+
"""
36
+
assertresponse.textisnotNone, "Response text should not be None"
37
+
assertlen(response.text) >0, "Response text should not be empty"
38
+
assertnothasattr(response, 'exception') orresponse.exceptionisNone, f"Response should not have an exception, got: {getattr(response, 'exception', None)}"
39
+
16
40
@pytest.fixture
17
41
asyncdefllm(self) ->BedrockLLM:
18
42
"""Test BedrockLLM initialization with a provided client."""
0 commit comments