Add LogCaptureFixture type hints in tests (#118372)

This commit is contained in:
epenet 2024-05-29 14:10:00 +02:00 committed by GitHub
parent aeee222df4
commit 166c588cac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 98 additions and 47 deletions

View file

@ -1,5 +1,7 @@
"""Test the send_message service."""
import pytest
from homeassistant.components.matrix import (
ATTR_FORMAT,
ATTR_IMAGES,
@ -14,7 +16,11 @@ from tests.components.matrix.conftest import TEST_BAD_ROOM, TEST_JOINABLE_ROOMS
async def test_send_message(
hass: HomeAssistant, matrix_bot: MatrixBot, image_path, matrix_events, caplog
hass: HomeAssistant,
matrix_bot: MatrixBot,
image_path,
matrix_events,
caplog: pytest.LogCaptureFixture,
):
"""Test the send_message service."""
@ -55,7 +61,10 @@ async def test_send_message(
async def test_unsendable_message(
hass: HomeAssistant, matrix_bot: MatrixBot, matrix_events, caplog
hass: HomeAssistant,
matrix_bot: MatrixBot,
matrix_events,
caplog: pytest.LogCaptureFixture,
):
"""Test the send_message service with an invalid room."""
assert len(matrix_events) == 0