mirror of
https://github.com/home-assistant/core.git
synced 2025-08-30 18:01:31 +02:00
Fix RuntimeWarning in asuswrt tests (#150580)
This commit is contained in:
@@ -222,7 +222,7 @@ def mock_controller_connect_http_sens_fail(connect_http):
|
|||||||
def mock_controller_connect_http_sens_detect():
|
def mock_controller_connect_http_sens_detect():
|
||||||
"""Mock a successful sensor detection using http library."""
|
"""Mock a successful sensor detection using http library."""
|
||||||
|
|
||||||
def _get_sensors_side_effect(datatype):
|
async def _get_sensors_side_effect(datatype):
|
||||||
if datatype == AsusData.TEMPERATURE:
|
if datatype == AsusData.TEMPERATURE:
|
||||||
return list(MOCK_TEMPERATURES_HTTP)
|
return list(MOCK_TEMPERATURES_HTTP)
|
||||||
if datatype == AsusData.CPU:
|
if datatype == AsusData.CPU:
|
||||||
|
@@ -377,7 +377,6 @@ async def test_cpu_sensors_http(
|
|||||||
connect_http_sens_detect,
|
connect_http_sens_detect,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test creating AsusWRT cpu sensors."""
|
"""Test creating AsusWRT cpu sensors."""
|
||||||
connect_http_sens_detect(AsusData.CPU)
|
|
||||||
config_entry, sensor_prefix = _setup_entry(hass, CONFIG_DATA_HTTP, SENSORS_CPU)
|
config_entry, sensor_prefix = _setup_entry(hass, CONFIG_DATA_HTTP, SENSORS_CPU)
|
||||||
config_entry.add_to_hass(hass)
|
config_entry.add_to_hass(hass)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user