mirror of
https://github.com/home-assistant/core.git
synced 2026-09-28 02:18:10 -04:00
Add memory/cpu percentage to Supervisor addons entities (#57468)
* Add memory/cpu percentage to Supervisor addons entities * fixed lint * Use a single update function. Fixed tests * use constant * review comments * oops
This commit is contained in:
@@ -177,6 +177,18 @@ async def test_api_addon_info(hassio_handler, aioclient_mock):
|
||||
assert aioclient_mock.call_count == 1
|
||||
|
||||
|
||||
async def test_api_addon_stats(hassio_handler, aioclient_mock):
|
||||
"""Test setup with API Add-on stats."""
|
||||
aioclient_mock.get(
|
||||
"http://127.0.0.1/addons/test/stats",
|
||||
json={"result": "ok", "data": {"memory_percent": 0.01}},
|
||||
)
|
||||
|
||||
data = await hassio_handler.get_addon_stats("test")
|
||||
assert data["memory_percent"] == 0.01
|
||||
assert aioclient_mock.call_count == 1
|
||||
|
||||
|
||||
async def test_api_discovery_message(hassio_handler, aioclient_mock):
|
||||
"""Test setup with API discovery message."""
|
||||
aioclient_mock.get(
|
||||
|
||||
Reference in New Issue
Block a user