mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Add caplog to known fixtures in pylint plugin (#87617)
This commit is contained in:
parent
c78cae4483
commit
ef6798e854
@ -91,6 +91,7 @@ _METHOD_MATCH: list[TypeHintMatch] = [
|
||||
]
|
||||
|
||||
_TEST_FIXTURES: dict[str, list[str] | str] = {
|
||||
"caplog": "pytest.LogCaptureFixture",
|
||||
"mqtt_client_mock": "MqttMockPahoClient",
|
||||
"mqtt_mock": "MqttMockHAClient",
|
||||
"mqtt_mock_entry_no_yaml_config": "MqttMockHAClientGenerator",
|
||||
|
@ -114,7 +114,7 @@ async def test_field_types(
|
||||
assert hass.states.get(f"sensor.test_{entity_id}").state == expected
|
||||
|
||||
|
||||
async def test_no_field(hass: HomeAssistant, caplog: Any) -> None:
|
||||
async def test_no_field(hass: HomeAssistant, caplog: pytest.LogCaptureFixture) -> None:
|
||||
"""Test behavior when the expected field is not present."""
|
||||
config_entry = MockConfigEntry(domain=DOMAIN, data=MOCK_ENTRY_DATA)
|
||||
config_entry.add_to_hass(hass)
|
||||
|
@ -1,7 +1,6 @@
|
||||
"""Test the motionEye camera web hooks."""
|
||||
import copy
|
||||
from http import HTTPStatus
|
||||
from typing import Any
|
||||
from unittest.mock import AsyncMock, Mock, call, patch
|
||||
|
||||
from motioneye_client.const import (
|
||||
@ -15,6 +14,7 @@ from motioneye_client.const import (
|
||||
KEY_WEB_HOOK_STORAGE_HTTP_METHOD,
|
||||
KEY_WEB_HOOK_STORAGE_URL,
|
||||
)
|
||||
import pytest
|
||||
|
||||
from homeassistant.components.motioneye.const import (
|
||||
ATTR_EVENT_TYPE,
|
||||
@ -250,8 +250,7 @@ async def test_setup_camera_with_correct_webhook(
|
||||
|
||||
|
||||
async def test_setup_camera_with_no_home_assistant_urls(
|
||||
hass: HomeAssistant,
|
||||
caplog: Any,
|
||||
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
) -> None:
|
||||
"""Verify setup works without Home Assistant internal/external URLs."""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user