test_application_inference_profile() — anthropic-sdk-python Function Reference
Architecture documentation for the test_application_inference_profile() function in test_bedrock.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 181eb716_17c0_6c77_28b7_113fa5a58d30["test_application_inference_profile()"] ba53edc6_e72a_dfe0_42d5_c2a06c57d6a1["test_bedrock.py"] 181eb716_17c0_6c77_28b7_113fa5a58d30 -->|defined in| ba53edc6_e72a_dfe0_42d5_c2a06c57d6a1 style 181eb716_17c0_6c77_28b7_113fa5a58d30 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/lib/test_bedrock.py lines 137–166
def test_application_inference_profile(respx_mock: MockRouter) -> None:
respx_mock.post(re.compile(r"https://bedrock-runtime\.us-east-1\.amazonaws\.com/model/.*/invoke")).mock(
side_effect=[
httpx.Response(500, json={"error": "server error"}, headers={"retry-after-ms": "10"}),
httpx.Response(200, json={"foo": "bar"}),
]
)
sync_client.messages.create(
max_tokens=1024,
messages=[
{
"role": "user",
"content": "Say hello there!",
}
],
model="arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/jf2sje1c0jnb",
)
calls = cast("list[MockRequestCall]", respx_mock.calls)
assert len(calls) == 2
assert (
calls[0].request.url
== "https://bedrock-runtime.us-east-1.amazonaws.com/model/arn:aws:bedrock:us-east-1:123456789012:application-inference-profile%2Fjf2sje1c0jnb/invoke"
)
assert (
calls[1].request.url
== "https://bedrock-runtime.us-east-1.amazonaws.com/model/arn:aws:bedrock:us-east-1:123456789012:application-inference-profile%2Fjf2sje1c0jnb/invoke"
)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_application_inference_profile() do?
test_application_inference_profile() is a function in the anthropic-sdk-python codebase, defined in tests/lib/test_bedrock.py.
Where is test_application_inference_profile() defined?
test_application_inference_profile() is defined in tests/lib/test_bedrock.py at line 137.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free