Fix ollama history trimming test (#140538)

This commit is contained in:
Shay Levy 2025-03-13 21:41:45 +02:00 committed by GitHub
parent fa57d57215
commit 87f726141a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,7 @@ from collections.abc import AsyncGenerator
from typing import Any from typing import Any
from unittest.mock import AsyncMock, Mock, patch from unittest.mock import AsyncMock, Mock, patch
from freezegun.api import FrozenDateTimeFactory
from ollama import Message, ResponseError from ollama import Message, ResponseError
import pytest import pytest
from syrupy.assertion import SnapshotAssertion from syrupy.assertion import SnapshotAssertion
@ -404,7 +405,10 @@ async def test_unknown_hass_api(
async def test_message_history_trimming( async def test_message_history_trimming(
hass: HomeAssistant, mock_config_entry: MockConfigEntry, mock_init_component hass: HomeAssistant,
mock_config_entry: MockConfigEntry,
mock_init_component,
freezer: FrozenDateTimeFactory,
) -> None: ) -> None:
"""Test that a single message history is trimmed according to the config.""" """Test that a single message history is trimmed according to the config."""
response_idx = 0 response_idx = 0