import pytest


@pytest.fixture
def sample_holdings_json():
    """Returns a sample API response for holdings."""
    return {
        "data": [
            {
                "instrumentToken": "111",
                "exchangeSegment": "nse_cm",
                "tradingSymbol": "RELIANCE",
                "quantity": 10,
                "averagePrice": 2000.0,
                "currentPrice": 0,  # Will be calculated/hydrated
                "profitAndLoss": 0,
                "sector": "Oil & Gas",
            },
            {
                "instrumentToken": "222",
                "exchangeSegment": "nse_cm",
                "tradingSymbol": "TCS",
                "quantity": 5,
                "averagePrice": 3000.0,
                "currentPrice": 0,
                "profitAndLoss": 0,
                "sector": "IT",
            },
        ]
    }


@pytest.fixture
def mock_client(mocker):
    """Mocks the NeoAPI client."""
    client = mocker.Mock()
    # Setup default return values for common methods if needed
    client.holdings.return_value = {"data": []}
    client.positions.return_value = {"data": []}
    client.quotes.return_value = {"data": []}
    return client
