Clean up some of the ozw tests (#41578)

* Remove some unnecessary fixtures and combine csv dumps
This commit is contained in:
Chris
2020-10-10 09:45:20 +02:00
committed by GitHub
parent 025bdd74a1
commit de300ddd56
5 changed files with 177 additions and 189 deletions
-12
View File
@@ -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."""
+4 -4
View File
@@ -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")