diff --git a/tests/helpers/test_frame.py b/tests/helpers/test_frame.py index 37f3e7ec95f23f44b9e3aa1f9039d019c2679751..936940869d6b5658910b92fa01c6ac92485233c1 100644 --- a/tests/helpers/test_frame.py +++ b/tests/helpers/test_frame.py @@ -92,3 +92,16 @@ async def test_prevent_flooding(caplog): assert what not in caplog.text assert key in frame._REPORTED_INTEGRATIONS assert len(frame._REPORTED_INTEGRATIONS) == 1 + + +async def test_report_missing_integration_frame(caplog): + """Test reporting when no integration is detected.""" + + what = "teststring" + with patch( + "homeassistant.helpers.frame.get_integration_frame", + side_effect=frame.MissingIntegrationFrame, + ): + frame.report(what, error_if_core=False) + assert what in caplog.text + assert caplog.text.count(what) == 1