mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
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:
committed by
GitHub
parent
27219b6962
commit
6bb4e7d62c
@@ -927,12 +927,15 @@ async def test_async_get_all_descriptions_failing_integration(
|
||||
|
||||
logger_config = {DOMAIN_LOGGER: {}}
|
||||
await async_setup_component(hass, DOMAIN_LOGGER, logger_config)
|
||||
with patch(
|
||||
"homeassistant.helpers.service.async_get_integrations",
|
||||
return_value={"logger": ImportError},
|
||||
), patch(
|
||||
"homeassistant.helpers.service.translation.async_get_translations",
|
||||
return_value={},
|
||||
with (
|
||||
patch(
|
||||
"homeassistant.helpers.service.async_get_integrations",
|
||||
return_value={"logger": ImportError},
|
||||
),
|
||||
patch(
|
||||
"homeassistant.helpers.service.translation.async_get_translations",
|
||||
return_value={},
|
||||
),
|
||||
):
|
||||
descriptions = await service.async_get_all_descriptions(hass)
|
||||
|
||||
@@ -1294,9 +1297,12 @@ async def test_call_context_target_specific_no_auth(
|
||||
hass: HomeAssistant, mock_handle_entity_call, mock_entities
|
||||
) -> None:
|
||||
"""Check targeting specific entities without auth."""
|
||||
with pytest.raises(exceptions.Unauthorized) as err, patch(
|
||||
"homeassistant.auth.AuthManager.async_get_user",
|
||||
return_value=Mock(permissions=PolicyPermissions({}, None), is_admin=False),
|
||||
with (
|
||||
pytest.raises(exceptions.Unauthorized) as err,
|
||||
patch(
|
||||
"homeassistant.auth.AuthManager.async_get_user",
|
||||
return_value=Mock(permissions=PolicyPermissions({}, None), is_admin=False),
|
||||
),
|
||||
):
|
||||
await service.entity_service_call(
|
||||
hass,
|
||||
|
||||
Reference in New Issue
Block a user