I have a feature test that checks if the agent is ...
# agents
s
I have a feature test that checks if the agent is consistent given the same user inputs. It runs a whole conversation based on the framework in here. That's already great, but I want to cover shutdown callback too . How can I test them? 1. How can I add a shutdown_callback to the session created for testing? 2. How can I simulate the end of the call?
Copy code
# here add somehow the shutdown callbacks (but I need the ctx: JobContext)
await session.start(agent)
...
await session.aclose()
# and here assert the calls to the shutdown callback, but how?