mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Clean up some of the ozw tests (#41578)
* Remove some unnecessary fixtures and combine csv dumps
This commit is contained in:
parent
025bdd74a1
commit
de300ddd56
@ -33,18 +33,6 @@ def light_new_ozw_data_fixture():
|
||||
return load_fixture("ozw/light_new_ozw_network_dump.csv")
|
||||
|
||||
|
||||
@pytest.fixture(name="light_pure_rgb_dimmer_data", scope="session")
|
||||
def light_pure_rgb_dimmer_data_fixture():
|
||||
"""Load light rgb and dimmer MQTT data and return it."""
|
||||
return load_fixture("ozw/light_pure_rgb_dimmer_dump.csv")
|
||||
|
||||
|
||||
@pytest.fixture(name="light_no_rgb_data", scope="session")
|
||||
def light_no_rgb_data_fixture():
|
||||
"""Load light dimmer MQTT data and return it."""
|
||||
return load_fixture("ozw/light_no_rgb_network_dump.csv")
|
||||
|
||||
|
||||
@pytest.fixture(name="light_no_ww_data", scope="session")
|
||||
def light_no_ww_data_fixture():
|
||||
"""Load light dimmer MQTT data and return it."""
|
||||
|
@ -351,10 +351,10 @@ async def test_light(hass, light_data, light_msg, light_rgb_msg, sent_messages):
|
||||
|
||||
|
||||
async def test_pure_rgb_dimmer_light(
|
||||
hass, light_pure_rgb_dimmer_data, light_msg, light_pure_rgb_msg, sent_messages
|
||||
hass, light_data, light_pure_rgb_msg, sent_messages
|
||||
):
|
||||
"""Test light with no color channels command class."""
|
||||
receive_message = await setup_ozw(hass, fixture=light_pure_rgb_dimmer_data)
|
||||
receive_message = await setup_ozw(hass, fixture=light_data)
|
||||
|
||||
# Test loaded
|
||||
state = hass.states.get("light.kitchen_rgb_strip_level")
|
||||
@ -392,9 +392,9 @@ async def test_pure_rgb_dimmer_light(
|
||||
assert state.attributes["hs_color"] == (300.0, 70.196)
|
||||
|
||||
|
||||
async def test_no_rgb_light(hass, light_no_rgb_data, light_no_rgb_msg, sent_messages):
|
||||
async def test_no_rgb_light(hass, light_data, light_no_rgb_msg, sent_messages):
|
||||
"""Test setting up config entry."""
|
||||
receive_message = await setup_ozw(hass, fixture=light_no_rgb_data)
|
||||
receive_message = await setup_ozw(hass, fixture=light_data)
|
||||
|
||||
# Test loaded no RGBW support (dimmer only)
|
||||
state = hass.states.get("light.master_bedroom_l_level")
|
||||
|
174
tests/fixtures/ozw/light_network_dump.csv
vendored
174
tests/fixtures/ozw/light_network_dump.csv
vendored
File diff suppressed because one or more lines are too long
41
tests/fixtures/ozw/light_no_rgb_network_dump.csv
vendored
41
tests/fixtures/ozw/light_no_rgb_network_dump.csv
vendored
File diff suppressed because one or more lines are too long
131
tests/fixtures/ozw/light_pure_rgb_dimmer_dump.csv
vendored
131
tests/fixtures/ozw/light_pure_rgb_dimmer_dump.csv
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user