mirror of
https://github.com/home-assistant/core.git
synced 2025-11-14 21:40:16 +00:00
Avoid use of datetime.utc* methods deprecated in Python 3.12 (#93684)
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
"""The tests for the Scrape sensor platform."""
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import timedelta
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
@@ -247,7 +247,7 @@ async def test_scrape_sensor_no_data_refresh(hass: HomeAssistant) -> None:
|
||||
assert state.state == "Current Version: 2021.12.10"
|
||||
|
||||
mocker.payload = "test_scrape_sensor_no_data"
|
||||
async_fire_time_changed(hass, datetime.utcnow() + DEFAULT_SCAN_INTERVAL)
|
||||
async_fire_time_changed(hass, dt_util.utcnow() + DEFAULT_SCAN_INTERVAL)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
state = hass.states.get("sensor.ha_version")
|
||||
|
||||
Reference in New Issue
Block a user