Improve patching for nzbget sensor tests (#41032)

This commit is contained in:
Chris Talkington 2020-10-02 01:32:22 -05:00 committed by GitHub
parent 9d3ddb8981
commit afc388c55a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ from tests.async_mock import patch
async def test_sensors(hass, nzbget_api) -> None:
"""Test the creation and values of the sensors."""
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)
registry = await hass.helpers.entity_registry.async_get_registry()