mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 16:17:20 +00:00
Fix diagnostics tests
This commit is contained in:
parent
072c570660
commit
fb68146bce
@ -109,6 +109,38 @@ def mock_all(
|
||||
},
|
||||
},
|
||||
)
|
||||
aioclient_mock.get(
|
||||
"http://127.0.0.1/addons",
|
||||
json={
|
||||
"result": "ok",
|
||||
"data": {
|
||||
"addons": [
|
||||
{
|
||||
"name": "test",
|
||||
"slug": "test",
|
||||
"state": "started",
|
||||
"update_available": True,
|
||||
"icon": False,
|
||||
"version": "2.0.0",
|
||||
"version_latest": "2.0.1",
|
||||
"repository": "core",
|
||||
"url": "https://github.com/home-assistant/addons/test",
|
||||
},
|
||||
{
|
||||
"name": "test2",
|
||||
"slug": "test2",
|
||||
"state": "stopped",
|
||||
"update_available": False,
|
||||
"icon": True,
|
||||
"version": "3.1.0",
|
||||
"version_latest": "3.1.0",
|
||||
"repository": "core",
|
||||
"url": "https://github.com",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
)
|
||||
aioclient_mock.get(
|
||||
"http://127.0.0.1/core/stats",
|
||||
json={
|
||||
@ -177,10 +209,10 @@ async def test_diagnostics(
|
||||
hass, hass_client, config_entry
|
||||
)
|
||||
|
||||
assert "addons" in diagnostics["coordinator_data"]
|
||||
assert "core" in diagnostics["coordinator_data"]
|
||||
assert "supervisor" in diagnostics["coordinator_data"]
|
||||
assert "os" in diagnostics["coordinator_data"]
|
||||
assert "host" in diagnostics["coordinator_data"]
|
||||
assert "addons" in diagnostics["addons_coordinator_data"]
|
||||
|
||||
assert len(diagnostics["devices"]) == 6
|
||||
|
Loading…
x
Reference in New Issue
Block a user