chore: apply suggestion
Changed `add_background_task` to `add_behavior` and added extra docs.
This commit is contained in:
@@ -35,7 +35,7 @@ async def test_setup_bind(zmq_context, mocker):
|
||||
coro.close()
|
||||
|
||||
swallow = Swallow()
|
||||
agent.add_background_task = swallow
|
||||
agent.add_behavior = swallow
|
||||
|
||||
await agent.setup()
|
||||
|
||||
@@ -62,7 +62,7 @@ async def test_setup_connect(zmq_context, mocker):
|
||||
coro.close()
|
||||
|
||||
swallow = Swallow()
|
||||
agent.add_background_task = swallow
|
||||
agent.add_behavior = swallow
|
||||
|
||||
await agent.setup()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -36,7 +36,7 @@ async def test_transcription_agent_flow(mock_zmq_context):
|
||||
agent.send = AsyncMock()
|
||||
|
||||
agent._running = True
|
||||
agent.add_background_task = AsyncMock()
|
||||
agent.add_behavior = AsyncMock()
|
||||
|
||||
await agent.setup()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user