mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-05-24 19:56:30 +00:00

* Use Sentry helper function to report warnings Don't use Sentry directly but the existing helper function. * Add pytest that Sentry is by default off * Address ruff * Address ruff
16 lines
419 B
Python
16 lines
419 B
Python
"""Unit tests for Sentry."""
|
|
|
|
from unittest.mock import patch
|
|
|
|
from supervisor.bootstrap import initialize_coresys
|
|
|
|
|
|
async def test_sentry_disabled_by_default(supervisor_name):
|
|
"""Test diagnostics off by default."""
|
|
with (
|
|
patch("supervisor.bootstrap.initialize_system"),
|
|
patch("sentry_sdk.init") as sentry_init,
|
|
):
|
|
await initialize_coresys()
|
|
sentry_init.assert_not_called()
|