"""Fixtures for storage module tests."""

import pytest
from unittest.mock import MagicMock


@pytest.fixture
def mock_session():
    """Mock SQLAlchemy session."""
    session = MagicMock()
    return session


@pytest.fixture
def mock_research_history():
    """Mock ResearchHistory model instance."""
    record = MagicMock()
    record.id = "test-uuid-123"
    record.report_content = "# Test Report\n\nThis is a test report."
    record.research_meta = {"key": "value"}
    record.query = "test query"
    record.mode = "detailed"
    record.created_at = "2024-01-01T10:00:00"
    record.completed_at = "2024-01-01T10:30:00"
    record.duration_seconds = 1800
    return record


@pytest.fixture
def sample_report_content():
    """Sample report content for testing."""
    return """# Research Report

## Summary
This is a test research report.

## Findings
1. Finding one
2. Finding two

## Conclusion
Test conclusion.
"""


@pytest.fixture
def sample_metadata():
    """Sample metadata for testing."""
    return {
        "query": "test query",
        "mode": "detailed",
        "sources_count": 5,
        "timestamp": "2024-01-01T10:00:00",
    }
