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:
Franck Nijhof 2022-03-13 19:34:02 +01:00 committed by GitHub
parent 4ea921e57a
commit 25f2e4bd99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 218 additions and 117 deletions

View 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