mirror of
https://github.com/home-assistant/core.git
synced 2026-09-24 07:25:52 -05:00
Add OS version and board type to analytics (#49725)
This commit is contained in:
@@ -133,6 +133,9 @@ async def test_send_base_with_supervisor(hass, caplog, aioclient_mock):
|
||||
with patch(
|
||||
"homeassistant.components.hassio.get_supervisor_info",
|
||||
side_effect=Mock(return_value={"supported": True, "healthy": True}),
|
||||
), patch(
|
||||
"homeassistant.components.hassio.get_os_info",
|
||||
side_effect=Mock(return_value={"board": "blue", "version": "123"}),
|
||||
), patch(
|
||||
"homeassistant.components.hassio.get_info",
|
||||
side_effect=Mock(return_value={}),
|
||||
@@ -154,7 +157,8 @@ async def test_send_base_with_supervisor(hass, caplog, aioclient_mock):
|
||||
|
||||
assert f"'uuid': '{MOCK_UUID}'" in caplog.text
|
||||
assert f"'version': '{MOCK_VERSION}'" in caplog.text
|
||||
assert "'supervisor': {'healthy': True, 'supported': True}}" in caplog.text
|
||||
assert "'supervisor': {'healthy': True, 'supported': True}" in caplog.text
|
||||
assert "'operating_system': {'board': 'blue', 'version': '123'}" in caplog.text
|
||||
assert "'installation_type':" in caplog.text
|
||||
assert "'integration_count':" not in caplog.text
|
||||
assert "'integrations':" not in caplog.text
|
||||
@@ -196,6 +200,9 @@ async def test_send_usage_with_supervisor(hass, caplog, aioclient_mock):
|
||||
"addons": [{"slug": "test_addon"}],
|
||||
}
|
||||
),
|
||||
), patch(
|
||||
"homeassistant.components.hassio.get_os_info",
|
||||
side_effect=Mock(return_value={}),
|
||||
), patch(
|
||||
"homeassistant.components.hassio.get_info",
|
||||
side_effect=Mock(return_value={}),
|
||||
@@ -299,6 +306,9 @@ async def test_send_statistics_with_supervisor(hass, caplog, aioclient_mock):
|
||||
"addons": [{"slug": "test_addon"}],
|
||||
}
|
||||
),
|
||||
), patch(
|
||||
"homeassistant.components.hassio.get_os_info",
|
||||
side_effect=Mock(return_value={}),
|
||||
), patch(
|
||||
"homeassistant.components.hassio.get_info",
|
||||
side_effect=Mock(return_value={}),
|
||||
|
||||
Reference in New Issue
Block a user