mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Cleanup pylint ignore in melnor tests (#118564)
This commit is contained in:
parent
51933b0f47
commit
6115dffd80
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||
|
||||
from collections.abc import Generator
|
||||
from datetime import UTC, datetime, time, timedelta
|
||||
from unittest.mock import AsyncMock, patch
|
||||
from unittest.mock import AsyncMock, _patch, patch
|
||||
|
||||
from melnor_bluetooth.device import Device
|
||||
import pytest
|
||||
@ -253,10 +253,9 @@ def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
yield mock_setup
|
||||
|
||||
|
||||
# pylint: disable=dangerous-default-value
|
||||
def patch_async_discovered_service_info(
|
||||
return_value: list[BluetoothServiceInfoBleak] = [FAKE_SERVICE_INFO_1],
|
||||
):
|
||||
return_value: list[BluetoothServiceInfoBleak],
|
||||
) -> _patch:
|
||||
"""Patch async_discovered_service_info a mocked device info."""
|
||||
return patch(
|
||||
"homeassistant.components.melnor.config_flow.async_discovered_service_info",
|
||||
|
@ -40,7 +40,7 @@ async def test_user_step_discovered_devices(
|
||||
) -> None:
|
||||
"""Test we properly handle device picking."""
|
||||
|
||||
with patch_async_discovered_service_info():
|
||||
with patch_async_discovered_service_info([FAKE_SERVICE_INFO_1]):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
DOMAIN,
|
||||
context={"source": config_entries.SOURCE_USER},
|
||||
|
Loading…
x
Reference in New Issue
Block a user