1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Use pytest.mark.freeze_time in snoo tests (#156353)

This commit is contained in:
Erik Montnemery
2025-11-11 13:02:01 +01:00
committed by GitHub
parent 3068e19843
commit a6a1519c06

View File

@@ -2,7 +2,7 @@
from unittest.mock import AsyncMock
from freezegun import freeze_time
import pytest
from homeassistant.const import STATE_UNAVAILABLE
from homeassistant.core import HomeAssistant
@@ -11,7 +11,7 @@ from . import async_init_integration, find_update_callback
from .const import MOCK_SNOO_DATA
@freeze_time("2025-01-01 12:00:00")
@pytest.mark.freeze_time("2025-01-01 12:00:00")
async def test_events(hass: HomeAssistant, bypass_api: AsyncMock) -> None:
"""Test events and check test values are correctly set."""
await async_init_integration(hass)
@@ -26,7 +26,7 @@ async def test_events(hass: HomeAssistant, bypass_api: AsyncMock) -> None:
)
@freeze_time("2025-01-01 12:00:00")
@pytest.mark.freeze_time("2025-01-01 12:00:00")
async def test_events_data_on_startup(
hass: HomeAssistant, bypass_api: AsyncMock
) -> None: