Always setup demo platforms with device support from config entry (#94586)
* Always setup demo platforms with device support from config entry * Adjust test fixutres * Update tests depending on the demo integration
This commit is contained in:
parent
1b8c72e644
commit
9a3077d64a
54 changed files with 491 additions and 351 deletions
|
@ -1,8 +1,11 @@
|
|||
"""Test diagnostics."""
|
||||
from unittest.mock import ANY
|
||||
from unittest.mock import ANY, patch
|
||||
|
||||
import pytest
|
||||
|
||||
from homeassistant import setup
|
||||
from homeassistant.components import google_assistant as ga, switch
|
||||
from homeassistant.const import Platform
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.setup import async_setup_component
|
||||
|
||||
|
@ -12,6 +15,16 @@ from tests.components.diagnostics import get_diagnostics_for_config_entry
|
|||
from tests.typing import ClientSessionGenerator
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
async def switch_only() -> None:
|
||||
"""Enable only the switch platform."""
|
||||
with patch(
|
||||
"homeassistant.components.demo.COMPONENTS_WITH_CONFIG_ENTRY_DEMO_PLATFORM",
|
||||
[Platform.SWITCH],
|
||||
):
|
||||
yield
|
||||
|
||||
|
||||
async def test_diagnostics(
|
||||
hass: HomeAssistant, hass_client: ClientSessionGenerator
|
||||
) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue