Blank out discovery info (#56097)

This commit is contained in:
Joakim Sørensen 2021-09-11 21:34:19 +02:00 committed by GitHub
parent 64fd496932
commit bcb3c426f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 31 deletions

View file

@ -559,3 +559,20 @@ async def test_api_call_service_bad_data(hass, mock_api_client):
"/api/services/test_domain/test_service", json={"hello": 5}
)
assert resp.status == 400
async def test_api_get_discovery_info(hass, mock_api_client):
"""Test the return of discovery info."""
resp = await mock_api_client.get(const.URL_API_DISCOVERY_INFO)
result = await resp.json()
assert result == {
"base_url": "",
"external_url": "",
"installation_type": "",
"internal_url": "",
"location_name": "",
"requires_api_password": True,
"uuid": "",
"version": "",
}