Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

1.4 KB
Raw Blame
"""Fixtures for error_handling module tests."""

import pytest
from unittest.mock import MagicMock


@pytest.fixture
def error_reporter():
    """Create ErrorReporter instance."""
    from local_deep_research.error_handling.error_reporter import ErrorReporter

    return ErrorReporter()


@pytest.fixture
def error_report_generator():
    """Create ErrorReportGenerator instance."""
    from local_deep_research.error_handling.report_generator import (
        ErrorReportGenerator,
    )

    return ErrorReportGenerator()


@pytest.fixture
def sample_partial_results():
    """Sample partial results for testing."""
    return {
        "current_knowledge": "This is the current knowledge about the topic. "
        * 20,
        "search_results": [
            {"title": "Result 1", "url": "https://example.com/1"},
            {"title": "Result 2", "url": "https://example.com/2"},
            {"title": "Result 3", "url": "https://example.com/3"},
        ],
        "findings": [
            {"phase": "Phase 1", "content": "Finding 1 content"},
            {"phase": "Phase 2", "content": "Finding 2 content"},
        ],
    }


@pytest.fixture
def mock_notification_manager():
    """Mock NotificationManager."""
    return MagicMock()


@pytest.fixture
def mock_context_with_username():
    """Context dict with username."""
    return {
        "username": "testuser",
        "query": "test query",
        "research_id": "test-uuid",
    }