Improve patching for nzbget sensor tests (#41032)
This commit is contained in:
parent
9d3ddb8981
commit
afc388c55a
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ from tests.async_mock import patch
|
||||||
async def test_sensors(hass, nzbget_api) -> None:
|
async def test_sensors(hass, nzbget_api) -> None:
|
||||||
"""Test the creation and values of the sensors."""
|
"""Test the creation and values of the sensors."""
|
||||||
now = dt_util.utcnow().replace(microsecond=0)
|
now = dt_util.utcnow().replace(microsecond=0)
|
||||||
with patch("homeassistant.util.dt.utcnow", return_value=now):
|
with patch("homeassistant.components.nzbget.sensor.utcnow", return_value=now):
|
||||||
entry = await init_integration(hass)
|
entry = await init_integration(hass)
|
||||||
|
|
||||||
registry = await hass.helpers.entity_registry.async_get_registry()
|
registry = await hass.helpers.entity_registry.async_get_registry()
|
||||||
|
|
Loading…
Add table
Reference in a new issue