Fix flapping flux tests (#37346)
This commit is contained in:
parent
49bbdb3c21
commit
8bce9be590
1 changed files with 10 additions and 6 deletions
|
@ -124,7 +124,7 @@ async def test_invalid_config_no_lights(hass):
|
|||
)
|
||||
|
||||
|
||||
async def test_flux_when_switch_is_off(hass):
|
||||
async def test_flux_when_switch_is_off(hass, legacy_patchable_time):
|
||||
"""Test the flux switch when it is off."""
|
||||
platform = getattr(hass.components, "test.light")
|
||||
platform.init()
|
||||
|
@ -174,7 +174,7 @@ async def test_flux_when_switch_is_off(hass):
|
|||
assert not turn_on_calls
|
||||
|
||||
|
||||
async def test_flux_before_sunrise(hass):
|
||||
async def test_flux_before_sunrise(hass, legacy_patchable_time):
|
||||
"""Test the flux switch before sunrise."""
|
||||
platform = getattr(hass.components, "test.light")
|
||||
platform.init()
|
||||
|
@ -228,7 +228,7 @@ async def test_flux_before_sunrise(hass):
|
|||
assert call.data[light.ATTR_XY_COLOR] == [0.606, 0.379]
|
||||
|
||||
|
||||
async def test_flux_before_sunrise_known_location(hass):
|
||||
async def test_flux_before_sunrise_known_location(hass, legacy_patchable_time):
|
||||
"""Test the flux switch before sunrise."""
|
||||
platform = getattr(hass.components, "test.light")
|
||||
platform.init()
|
||||
|
@ -500,7 +500,7 @@ async def test_flux_with_custom_start_stop_times(hass, legacy_patchable_time):
|
|||
assert call.data[light.ATTR_XY_COLOR] == [0.504, 0.385]
|
||||
|
||||
|
||||
async def test_flux_before_sunrise_stop_next_day(hass):
|
||||
async def test_flux_before_sunrise_stop_next_day(hass, legacy_patchable_time):
|
||||
"""Test the flux switch before sunrise.
|
||||
|
||||
This test has the stop_time on the next day (after midnight).
|
||||
|
@ -680,7 +680,9 @@ async def test_flux_after_sunset_before_midnight_stop_next_day(
|
|||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
async def test_flux_after_sunset_after_midnight_stop_next_day(hass):
|
||||
async def test_flux_after_sunset_after_midnight_stop_next_day(
|
||||
hass, legacy_patchable_time
|
||||
):
|
||||
"""Test the flux switch after sunset and before stop.
|
||||
|
||||
This test has the stop_time on the next day (after midnight).
|
||||
|
@ -738,7 +740,9 @@ async def test_flux_after_sunset_after_midnight_stop_next_day(hass):
|
|||
|
||||
|
||||
# pylint: disable=invalid-name
|
||||
async def test_flux_after_stop_before_sunrise_stop_next_day(hass):
|
||||
async def test_flux_after_stop_before_sunrise_stop_next_day(
|
||||
hass, legacy_patchable_time
|
||||
):
|
||||
"""Test the flux switch after stop and before sunrise.
|
||||
|
||||
This test has the stop_time on the next day (after midnight).
|
||||
|
|
Loading…
Add table
Reference in a new issue