Remove unnecessary class from wemo test_fan (#72377)

This commit is contained in:
Eric Severance 2022-05-23 10:02:42 -07:00 committed by GitHub
parent f25663067c
commit e2a80e7a45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,7 @@ from homeassistant.const import ATTR_ENTITY_ID, SERVICE_TURN_ON, STATE_OFF, STAT
from homeassistant.setup import async_setup_component from homeassistant.setup import async_setup_component
from . import entity_test_helpers from . import entity_test_helpers
from .conftest import async_create_wemo_entity
@pytest.fixture @pytest.fixture
@ -161,17 +162,10 @@ async def test_fan_set_percentage(
pywemo_device.set_state.assert_called_with(expected_fan_mode) pywemo_device.set_state.assert_called_with(expected_fan_mode)
class TestInitialFanMode: async def test_fan_mode_high_initially(hass, pywemo_device):
"""Test that the FanMode is set to High when turned on the first time."""
@pytest.fixture
def pywemo_device(self, pywemo_device):
"""Set the FanMode to off initially."""
pywemo_device.fan_mode = FanMode.Off
yield pywemo_device
async def test_fan_mode_high_initially(self, hass, pywemo_device, wemo_entity):
"""Verify the FanMode is set to High when turned on.""" """Verify the FanMode is set to High when turned on."""
pywemo_device.fan_mode = FanMode.Off
wemo_entity = await async_create_wemo_entity(hass, pywemo_device, "")
assert await hass.services.async_call( assert await hass.services.async_call(
FAN_DOMAIN, FAN_DOMAIN,
SERVICE_TURN_ON, SERVICE_TURN_ON,