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
@@ -69,9 +69,12 @@ async def test_google_update_report_state(
|
||||
|
||||
mock_conf._cloud.subscription_expired = False
|
||||
|
||||
with patch.object(mock_conf, "async_sync_entities") as mock_sync, patch(
|
||||
"homeassistant.components.google_assistant.report_state.async_enable_report_state"
|
||||
) as mock_report_state:
|
||||
with (
|
||||
patch.object(mock_conf, "async_sync_entities") as mock_sync,
|
||||
patch(
|
||||
"homeassistant.components.google_assistant.report_state.async_enable_report_state"
|
||||
) as mock_report_state,
|
||||
):
|
||||
await cloud_prefs.async_update(google_report_state=True)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
@@ -90,9 +93,12 @@ async def test_google_update_report_state_subscription_expired(
|
||||
|
||||
assert mock_conf._cloud.subscription_expired
|
||||
|
||||
with patch.object(mock_conf, "async_sync_entities") as mock_sync, patch(
|
||||
"homeassistant.components.google_assistant.report_state.async_enable_report_state"
|
||||
) as mock_report_state:
|
||||
with (
|
||||
patch.object(mock_conf, "async_sync_entities") as mock_sync,
|
||||
patch(
|
||||
"homeassistant.components.google_assistant.report_state.async_enable_report_state"
|
||||
) as mock_report_state,
|
||||
):
|
||||
await cloud_prefs.async_update(google_report_state=True)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
@@ -154,8 +160,9 @@ async def test_google_update_expose_trigger_sync(
|
||||
await hass.async_block_till_done()
|
||||
await config.async_connect_agent_user("mock-user-id")
|
||||
|
||||
with patch.object(config, "async_sync_entities") as mock_sync, patch.object(
|
||||
ga_helpers, "SYNC_DELAY", 0
|
||||
with (
|
||||
patch.object(config, "async_sync_entities") as mock_sync,
|
||||
patch.object(ga_helpers, "SYNC_DELAY", 0),
|
||||
):
|
||||
expose_entity(hass, light_entry.entity_id, True)
|
||||
await hass.async_block_till_done()
|
||||
@@ -164,8 +171,9 @@ async def test_google_update_expose_trigger_sync(
|
||||
|
||||
assert len(mock_sync.mock_calls) == 1
|
||||
|
||||
with patch.object(config, "async_sync_entities") as mock_sync, patch.object(
|
||||
ga_helpers, "SYNC_DELAY", 0
|
||||
with (
|
||||
patch.object(config, "async_sync_entities") as mock_sync,
|
||||
patch.object(ga_helpers, "SYNC_DELAY", 0),
|
||||
):
|
||||
expose_entity(hass, light_entry.entity_id, False)
|
||||
expose_entity(hass, binary_sensor_entry.entity_id, True)
|
||||
@@ -194,10 +202,10 @@ async def test_google_entity_registry_sync(
|
||||
await config.async_initialize()
|
||||
await config.async_connect_agent_user("mock-user-id")
|
||||
|
||||
with patch.object(
|
||||
config, "async_schedule_google_sync_all"
|
||||
) as mock_sync, patch.object(config, "async_sync_entities_all"), patch.object(
|
||||
ga_helpers, "SYNC_DELAY", 0
|
||||
with (
|
||||
patch.object(config, "async_schedule_google_sync_all") as mock_sync,
|
||||
patch.object(config, "async_sync_entities_all"),
|
||||
patch.object(ga_helpers, "SYNC_DELAY", 0),
|
||||
):
|
||||
# Created entity
|
||||
entry = entity_registry.async_get_or_create(
|
||||
|
||||
Reference in New Issue
Block a user