mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Prevent 3rd party lib from opening sockets in google_assistant tests (#56346)
This commit is contained in:
parent
1aa7c87151
commit
d494b3539d
@ -153,6 +153,10 @@ async def test_report_state(hass, aioclient_mock, hass_storage):
|
|||||||
await config.async_connect_agent_user(agent_user_id)
|
await config.async_connect_agent_user(agent_user_id)
|
||||||
message = {"devices": {}}
|
message = {"devices": {}}
|
||||||
|
|
||||||
|
with patch.object(config, "async_call_homegraph_api"):
|
||||||
|
# Wait for google_assistant.helpers.async_initialize.sync_google to be called
|
||||||
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
with patch.object(config, "async_call_homegraph_api") as mock_call:
|
with patch.object(config, "async_call_homegraph_api") as mock_call:
|
||||||
await config.async_report_state(message, agent_user_id)
|
await config.async_report_state(message, agent_user_id)
|
||||||
mock_call.assert_called_once_with(
|
mock_call.assert_called_once_with(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user