fix useless factory

This commit is contained in:
Michael Ingvarsson
2026-07-16 12:09:12 +02:00
parent e81f03c5aa
commit 479223ceb2
4 changed files with 7 additions and 103 deletions
+5 -5
View File
@@ -21,9 +21,9 @@ def temp_state_file(tmp_path: Path) -> Path:
@patch("core.orchestrator.AgentOrchestrator._get_state_file_path")
@patch("core.orchestrator.AgentDispatcher")
@patch("core.orchestrator.WorkspaceManager")
@patch("core.orchestrator.AgentFactory")
@patch("core.orchestrator.NotificationReaderAgent")
async def test_poll_and_dispatch_no_notifications(
mock_factory: MagicMock,
mock_notification_reader_class: MagicMock,
mock_workspace_class: MagicMock,
mock_dispatcher_class: MagicMock,
mock_get_path: MagicMock,
@@ -46,9 +46,9 @@ async def test_poll_and_dispatch_no_notifications(
@patch("core.orchestrator.AgentOrchestrator._get_state_file_path")
@patch("core.orchestrator.AgentDispatcher")
@patch("core.orchestrator.WorkspaceManager")
@patch("core.orchestrator.AgentFactory")
@patch("core.orchestrator.NotificationReaderAgent")
async def test_poll_and_dispatch_with_notifications(
mock_factory: MagicMock,
mock_notification_reader_class: MagicMock,
mock_workspace_class: MagicMock,
mock_dispatcher_class: MagicMock,
mock_get_path: MagicMock,
@@ -66,7 +66,7 @@ async def test_poll_and_dispatch_with_notifications(
notification_tools.skip_notification("Unrelated")
return "Decided"
mock_reader.decide_notification = AsyncMock(side_effect=mock_decide_notification)
mock_factory.create_notification_reader_agent.return_value = mock_reader
mock_notification_reader_class.return_value = mock_reader
mock_client = MagicMock(spec=GiteaClient)
mock_tools = MagicMock(spec=GiteaTools)