mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Fix ollama history trimming test (#140538)
This commit is contained in:
parent
fa57d57215
commit
87f726141a
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user