# tests/conftest.py
"""Shared test fixtures."""
from __future__ import annotations

MOCK_SEARCH_RESPONSE = {
    "query": "test query",
    "results_count": 1,
    "content": [
        {
            "type": "text",
            "url": "https://example.com",
            "text": {
                "full_text": "Full article content here.",
                "summary": "A short summary.",
                "author": "Test Author",
                "date_published": "2025-06-15",
                "links": [{"url": "https://ref.com", "text": "Reference"}],
            },
        }
    ],
    "meta": {
        "search_time_ms": 850,
        "pages_fetched": 1,
        "pages_rendered": 0,
        "content_mode": "both",
    },
}

MOCK_FETCH_RESPONSE = {
    "content": [
        {
            "type": "text",
            "url": "https://example.com",
            "text": {"summary": "Fetched summary"},
        }
    ],
    "meta": {"pages_fetched": 1, "pages_rendered": 0, "content_mode": "both"},
}

MOCK_ERROR_401 = {"error": {"code": "invalid_key", "message": "Invalid API key"}}
MOCK_ERROR_429 = {
    "error": {
        "code": "rate_limit_exceeded",
        "message": "Rate limit exceeded",
        "retry_after_seconds": 30,
    }
}
MOCK_ERROR_400 = {"error": {"code": "bad_request", "message": "Missing required field: query"}}
