Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/unit/channels/test_opencli_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ async def test_collect_agent_mode_http_success(channel):


@pytest.mark.asyncio
async def test_collect_agent_mode_ws_protocol_not_implemented(channel):
async def test_collect_agent_mode_ws_protocol_not_implemented(channel, db_engine):
"""Agent mode with ws protocol returns fail (not yet implemented)."""
from unittest.mock import create_autospec

Expand All @@ -553,6 +553,7 @@ async def test_collect_agent_mode_ws_protocol_not_implemented(channel):
with (
patch("backend.browser_pool.get_pool", return_value=mock_pool),
patch("backend.config.get_settings", return_value=mock_settings),
patch("backend.database.AsyncSessionLocal", _sessionmaker(db_engine)),
):
result = await channel.collect(
{"site": "example.com", "command": "list"}, {}
Expand All @@ -563,7 +564,7 @@ async def test_collect_agent_mode_ws_protocol_not_implemented(channel):


@pytest.mark.asyncio
async def test_collect_agent_mode_unknown_protocol(channel):
async def test_collect_agent_mode_unknown_protocol(channel, db_engine):
"""Agent mode with unknown protocol returns fail."""
from unittest.mock import create_autospec

Expand All @@ -584,6 +585,7 @@ async def test_collect_agent_mode_unknown_protocol(channel):
with (
patch("backend.browser_pool.get_pool", return_value=mock_pool),
patch("backend.config.get_settings", return_value=mock_settings),
patch("backend.database.AsyncSessionLocal", _sessionmaker(db_engine)),
):
result = await channel.collect(
{"site": "example.com", "command": "list"}, {}
Expand Down
Loading