Tweak schedule test (#77696)

This commit is contained in:
Erik Montnemery 2022-09-02 08:39:27 +02:00 committed by GitHub
parent 32e4a2515e
commit 8bab2a9bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,15 +176,10 @@ async def test_invalid_schedules(
assert error in caplog.text
@pytest.mark.parametrize(
"schedule",
({CONF_FROM: "07:00:00", CONF_TO: "11:00:00"},),
)
async def test_events_one_day(
hass: HomeAssistant,
schedule_setup: Callable[..., Coroutine[Any, Any, bool]],
caplog: pytest.LogCaptureFixture,
schedule: list[dict[str, str]],
freezer,
) -> None:
"""Test events only during one day of the week."""
@ -196,7 +191,7 @@ async def test_events_one_day(
"from_yaml": {
CONF_NAME: "from yaml",
CONF_ICON: "mdi:party-popper",
CONF_SUNDAY: schedule,
CONF_SUNDAY: {CONF_FROM: "07:00:00", CONF_TO: "11:00:00"},
}
}
},