From baf2ebf1f29b1d140f1c88bf74af3d88b93db921 Mon Sep 17 00:00:00 2001 From: Robert Svensson Date: Tue, 2 Jul 2024 12:43:34 +0200 Subject: [PATCH] Use fixtures in deCONZ diagnostics tests (#120968) --- tests/components/deconz/test_diagnostics.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/components/deconz/test_diagnostics.py b/tests/components/deconz/test_diagnostics.py index bfbc27b206d..64e0f417387 100644 --- a/tests/components/deconz/test_diagnostics.py +++ b/tests/components/deconz/test_diagnostics.py @@ -3,29 +3,25 @@ from pydeconz.websocket import State from syrupy import SnapshotAssertion +from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant -from .test_gateway import setup_deconz_integration - from tests.components.diagnostics import get_diagnostics_for_config_entry -from tests.test_util.aiohttp import AiohttpClientMocker from tests.typing import ClientSessionGenerator async def test_entry_diagnostics( hass: HomeAssistant, hass_client: ClientSessionGenerator, - aioclient_mock: AiohttpClientMocker, + config_entry_setup: ConfigEntry, mock_deconz_websocket, snapshot: SnapshotAssertion, ) -> None: """Test config entry diagnostics.""" - config_entry = await setup_deconz_integration(hass, aioclient_mock) - await mock_deconz_websocket(state=State.RUNNING) await hass.async_block_till_done() assert ( - await get_diagnostics_for_config_entry(hass, hass_client, config_entry) + await get_diagnostics_for_config_entry(hass, hass_client, config_entry_setup) == snapshot )