From 734331b4fb2d892458dc1d69a3a7b136c1c6fb8b Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 28 Dec 2022 10:02:21 +0100 Subject: [PATCH] Use different fixture, less patching --- tests/components/wled/test_light.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/components/wled/test_light.py b/tests/components/wled/test_light.py index 84ca7fe7aa..748360d82a 100644 --- a/tests/components/wled/test_light.py +++ b/tests/components/wled/test_light.py @@ -401,7 +401,7 @@ async def test_single_segment_with_keep_master_light( assert state.state == STATE_ON -@pytest.mark.parametrize("mock_wled", ["wled/rgb_single_segment.json"], indirect=True) +@pytest.mark.parametrize("mock_wled", ["wled/rgbw.json"], indirect=True) @pytest.mark.parametrize( "capabilities,color_modes", [ @@ -433,14 +433,13 @@ async def test_segment_light_capabilities( """Test segment light capabilities of WLED lights.""" update: WLEDDevice = mock_wled.update.return_value update.info.leds.segment_light_capabilities = [LightCapability(capabilities)] - update.state.segments[0].color_primary = (255, 0, 0, 0) mock_config_entry.add_to_hass(hass) await hass.config_entries.async_setup(mock_config_entry.entry_id) await hass.async_block_till_done() - state = hass.states.get("light.wled_rgb_light") + state = hass.states.get("light.wled_rgbw_light") assert state assert state.state == STATE_ON assert state.attributes.get(ATTR_COLOR_MODE) == color_modes[0]