MCPcopy Index your code
hub / github.com/google/adk-python / _assert_function_output

Function _assert_function_output

tests/integration/test_tools.py:276–287  ·  view source on GitHub ↗
(agent_runner: TestRunner, query: str, expected)

Source from the content-addressed store, hash-verified

274
275
276def _assert_function_output(agent_runner: TestRunner, query: str, expected):
277 agent_runner.run(query)
278
279 # Retrieve the latest model response event
280 model_response_event = agent_runner.get_events()[-1]
281
282 # Assert the response content
283 assert model_response_event.content.role == "model"
284 assert (
285 expected.lower()
286 in model_response_event.content.parts[0].text.strip().lower()
287 )

Callers 1

Calls 3

get_eventsMethod · 0.80
stripMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected