Small improvements for Switch as X (#68079)
* Small improvements forr Switch as X * Test improvements * Remove intregration tests from config flow test
This commit is contained in:
parent
4ea921e57a
commit
25f2e4bd99
7 changed files with 218 additions and 117 deletions
16
tests/components/switch_as_x/conftest.py
Normal file
16
tests/components/switch_as_x/conftest.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
"""Fixtures for the Switch as X integration tests."""
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Generator
|
||||
from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def mock_setup_entry() -> Generator[AsyncMock, None, None]:
|
||||
"""Mock setting up a config entry."""
|
||||
with patch(
|
||||
"homeassistant.components.switch_as_x.async_setup_entry", return_value=True
|
||||
) as mock_setup:
|
||||
yield mock_setup
|
Loading…
Add table
Add a link
Reference in a new issue