Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com> Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
parent
27219b6962
commit
6bb4e7d62c
1044 changed files with 24245 additions and 16750 deletions
|
@ -20,9 +20,12 @@ pytestmark = pytest.mark.usefixtures("system_get_info", "dsl_get_info", "wan_get
|
|||
@pytest.fixture(autouse=True)
|
||||
def override_platforms() -> Generator[None, None, None]:
|
||||
"""Override PLATFORMS_WITH_AUTH."""
|
||||
with patch(
|
||||
"homeassistant.components.sfr_box.PLATFORMS_WITH_AUTH", [Platform.BUTTON]
|
||||
), patch("homeassistant.components.sfr_box.coordinator.SFRBox.authenticate"):
|
||||
with (
|
||||
patch(
|
||||
"homeassistant.components.sfr_box.PLATFORMS_WITH_AUTH", [Platform.BUTTON]
|
||||
),
|
||||
patch("homeassistant.components.sfr_box.coordinator.SFRBox.authenticate"),
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
|
@ -73,10 +76,13 @@ async def test_reboot(hass: HomeAssistant, config_entry_with_auth: ConfigEntry)
|
|||
|
||||
# Reboot failed
|
||||
service_data = {ATTR_ENTITY_ID: "button.sfr_box_restart"}
|
||||
with patch(
|
||||
"homeassistant.components.sfr_box.button.SFRBox.system_reboot",
|
||||
side_effect=SFRBoxError,
|
||||
) as mock_action, pytest.raises(HomeAssistantError):
|
||||
with (
|
||||
patch(
|
||||
"homeassistant.components.sfr_box.button.SFRBox.system_reboot",
|
||||
side_effect=SFRBoxError,
|
||||
) as mock_action,
|
||||
pytest.raises(HomeAssistantError),
|
||||
):
|
||||
await hass.services.async_call(
|
||||
BUTTON_DOMAIN, SERVICE_PRESS, service_data=service_data, blocking=True
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue