# tests/conftest.py
import pytest
import asyncio


@pytest.fixture(scope="session")
def event_loop():
    loop = asyncio.get_event_loop_policy().new_event_loop()
    yield loop
    loop.close()


@pytest.fixture
def mock_keyring(monkeypatch):
    monkeypatch.setattr("second_opinion_mcp.server.keyring.get_password", lambda s, n: "test-api-key")
