chore: apply suggestion

Changed `add_background_task` to `add_behavior` and added extra docs.
This commit is contained in:
2025-11-22 10:28:52 +01:00
parent f8f833df64
commit 1f9926fe00
11 changed files with 24 additions and 18 deletions

View File

@@ -55,7 +55,7 @@ async def test_setup_success_connects_and_starts_robot(zmq_context):
coro.close()
swallow = Swallow()
agent.add_background_task = swallow
agent.add_behavior = swallow
await agent.setup()
@@ -85,7 +85,7 @@ async def test_setup_binds_when_requested(zmq_context):
coro.close()
swallow = Swallow()
agent.add_background_task = swallow
agent.add_behavior = swallow
with patch(speech_agent_path(), autospec=True) as MockRobot:
MockRobot.return_value.start = AsyncMock()
@@ -213,7 +213,7 @@ async def test_setup_warns_on_failed_negotiate(zmq_context, mocker):
async def swallow(coro):
coro.close()
agent.add_background_task = swallow
agent.add_behavior = swallow
agent._negotiate_connection = AsyncMock(return_value=False)
await agent.setup()