mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Simplify cloud request connection handling (#56243)
Co-authored-by: Pascal Vizeli <pascal.vizeli@syshack.ch>
This commit is contained in:
@@ -549,14 +549,8 @@ async def test_enabling_remote(hass, hass_ws_client, setup_api, mock_cloud_login
|
||||
|
||||
assert len(mock_connect.mock_calls) == 1
|
||||
|
||||
|
||||
async def test_disabling_remote(hass, hass_ws_client, setup_api, mock_cloud_login):
|
||||
"""Test we call right code to disable remote UI."""
|
||||
client = await hass_ws_client(hass)
|
||||
cloud = hass.data[DOMAIN]
|
||||
|
||||
with patch("hass_nabucasa.remote.RemoteUI.disconnect") as mock_disconnect:
|
||||
await client.send_json({"id": 5, "type": "cloud/remote/disconnect"})
|
||||
await client.send_json({"id": 6, "type": "cloud/remote/disconnect"})
|
||||
response = await client.receive_json()
|
||||
assert response["success"]
|
||||
assert not cloud.client.remote_autostart
|
||||
|
||||
Reference in New Issue
Block a user