Skip to content
Snippets Groups Projects
Unverified Commit 7e3d87a1 authored by Dave T's avatar Dave T Committed by GitHub
Browse files

Increase helpers.frame test coverage (#65137)

parent e26488b1
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment