mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 11:17: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] = {
|
_TEST_FIXTURES: dict[str, list[str] | str] = {
|
||||||
|
"caplog": "pytest.LogCaptureFixture",
|
||||||
"mqtt_client_mock": "MqttMockPahoClient",
|
"mqtt_client_mock": "MqttMockPahoClient",
|
||||||
"mqtt_mock": "MqttMockHAClient",
|
"mqtt_mock": "MqttMockHAClient",
|
||||||
"mqtt_mock_entry_no_yaml_config": "MqttMockHAClientGenerator",
|
"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
|
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."""
|
"""Test behavior when the expected field is not present."""
|
||||||
config_entry = MockConfigEntry(domain=DOMAIN, data=MOCK_ENTRY_DATA)
|
config_entry = MockConfigEntry(domain=DOMAIN, data=MOCK_ENTRY_DATA)
|
||||||
config_entry.add_to_hass(hass)
|
config_entry.add_to_hass(hass)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
"""Test the motionEye camera web hooks."""
|
"""Test the motionEye camera web hooks."""
|
||||||
import copy
|
import copy
|
||||||
from http import HTTPStatus
|
from http import HTTPStatus
|
||||||
from typing import Any
|
|
||||||
from unittest.mock import AsyncMock, Mock, call, patch
|
from unittest.mock import AsyncMock, Mock, call, patch
|
||||||
|
|
||||||
from motioneye_client.const import (
|
from motioneye_client.const import (
|
||||||
@ -15,6 +14,7 @@ from motioneye_client.const import (
|
|||||||
KEY_WEB_HOOK_STORAGE_HTTP_METHOD,
|
KEY_WEB_HOOK_STORAGE_HTTP_METHOD,
|
||||||
KEY_WEB_HOOK_STORAGE_URL,
|
KEY_WEB_HOOK_STORAGE_URL,
|
||||||
)
|
)
|
||||||
|
import pytest
|
||||||
|
|
||||||
from homeassistant.components.motioneye.const import (
|
from homeassistant.components.motioneye.const import (
|
||||||
ATTR_EVENT_TYPE,
|
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(
|
async def test_setup_camera_with_no_home_assistant_urls(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||||
caplog: Any,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Verify setup works without Home Assistant internal/external URLs."""
|
"""Verify setup works without Home Assistant internal/external URLs."""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user