mirror of
https://github.com/home-assistant/core.git
synced 2025-05-02 13:17:53 +00:00
Remove unneeded blocking sleep in srp_energy tests (#121141)
This commit is contained in:
parent
97de9c9f69
commit
229e54d0b1
@ -1,6 +1,5 @@
|
|||||||
"""Tests for the srp_energy sensor platform."""
|
"""Tests for the srp_energy sensor platform."""
|
||||||
|
|
||||||
import time
|
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
|
|
||||||
from requests.models import HTTPError
|
from requests.models import HTTPError
|
||||||
@ -80,7 +79,7 @@ async def test_srp_entity_timeout(
|
|||||||
):
|
):
|
||||||
client = srp_energy_mock.return_value
|
client = srp_energy_mock.return_value
|
||||||
client.validate.return_value = True
|
client.validate.return_value = True
|
||||||
client.usage = lambda _, __, ___: time.sleep(1) # noqa: ASYNC251
|
client.usage = lambda _, __, ___: None
|
||||||
mock_config_entry.add_to_hass(hass)
|
mock_config_entry.add_to_hass(hass)
|
||||||
|
|
||||||
await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
await hass.config_entries.async_setup(mock_config_entry.entry_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user