Skip to content

Commit

Permalink
Fix cloud tests doing socket I/O (home-assistant#105874)
Browse files Browse the repository at this point in the history
https://github.com/home-assistant/core/actions/runs/7233101649/job/19708631179?pr=105868
https://github.com/home-assistant/core/actions/runs/7232949349?pr=105834

I was hoping to only patch the library, but when I did that it still failed
because it had no access token
  • Loading branch information
bdraco authored Dec 17, 2023
1 parent 299a2ef commit 537dbd8
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions tests/components/cloud/test_http_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1204,10 +1204,19 @@ async def test_list_alexa_entities(
"interfaces": ["Alexa.PowerController", "Alexa.EndpointHealth", "Alexa"],
}

# Add the entity to the entity registry
entity_registry.async_get_or_create(
"light", "test", "unique", suggested_object_id="kitchen"
)
with patch(
(
"homeassistant.components.cloud.alexa_config.CloudAlexaConfig"
".async_get_access_token"
),
), patch(
"homeassistant.components.cloud.alexa_config.alexa_state_report.async_send_add_or_update_message"
):
# Add the entity to the entity registry
entity_registry.async_get_or_create(
"light", "test", "unique", suggested_object_id="kitchen"
)
await hass.async_block_till_done()

with patch(
"homeassistant.components.alexa.entities.async_get_entities",
Expand Down

0 comments on commit 537dbd8

Please sign in to comment.