Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tests/components/matrix/test_login.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test MatrixBot._login."""

from pydantic.dataclasses import dataclass
from dataclasses import dataclass

import pytest

from homeassistant.components.matrix import MatrixBot
Expand All @@ -17,7 +18,7 @@ class LoginTestParameters:
access_token: dict[str, str]
expected_login_state: bool
expected_caplog_messages: set[str]
expected_expection: type(Exception) | None = None
expected_expection: type[Exception] | None = None


good_password_missing_token = LoginTestParameters(
Expand Down
13 changes: 5 additions & 8 deletions tests/components/panel_custom/test_init.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
"""The tests for the panel_custom component."""

from unittest.mock import Mock, patch

from homeassistant import setup
from homeassistant.components import frontend, panel_custom
from homeassistant.core import HomeAssistant
Expand All @@ -22,14 +20,13 @@ async def test_webcomponent_custom_path_not_found(hass: HomeAssistant) -> None:
}
}

with patch("os.path.isfile", Mock(return_value=False)):
result = await setup.async_setup_component(hass, "panel_custom", config)
assert not result
result = await setup.async_setup_component(hass, "panel_custom", config)
assert not result

panels = hass.data.get(frontend.DATA_PANELS, [])
panels = hass.data.get(frontend.DATA_PANELS, [])

assert panels
assert "nice_url" not in panels
assert panels
assert "nice_url" not in panels


async def test_js_webcomponent(hass: HomeAssistant) -> None:
Expand Down
1 change: 1 addition & 0 deletions tests/components/reolink/test_media_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ async def test_browsing(
entry_id = config_entry.entry_id
reolink_connect.supported.return_value = 1
reolink_connect.model = "Reolink TrackMix PoE"
reolink_connect.is_nvr = False

with patch("homeassistant.components.reolink.PLATFORMS", [Platform.CAMERA]):
assert await hass.config_entries.async_setup(entry_id) is True
Expand Down
Loading