Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
089a3ab6d7
commit
00ec7f11f0
204 changed files with 908 additions and 921 deletions
|
@ -118,7 +118,7 @@ async def test_invalid_config(hass: HomeAssistant) -> None:
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
("schedule", "error"),
|
||||
(
|
||||
[
|
||||
(
|
||||
[
|
||||
{CONF_FROM: "00:00:00", CONF_TO: "23:59:59"},
|
||||
|
@ -153,7 +153,7 @@ async def test_invalid_config(hass: HomeAssistant) -> None:
|
|||
],
|
||||
"Invalid time range, from 06:00:00 is after 05:00:00",
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_invalid_schedules(
|
||||
hass: HomeAssistant,
|
||||
|
@ -419,10 +419,10 @@ async def test_non_adjacent_within_day(
|
|||
|
||||
@pytest.mark.parametrize(
|
||||
"schedule",
|
||||
(
|
||||
[
|
||||
{CONF_FROM: "00:00:00", CONF_TO: "24:00"},
|
||||
{CONF_FROM: "00:00:00", CONF_TO: "24:00:00"},
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_to_midnight(
|
||||
hass: HomeAssistant,
|
||||
|
@ -595,11 +595,11 @@ async def test_ws_delete(
|
|||
@pytest.mark.freeze_time("2022-08-10 20:10:00-07:00")
|
||||
@pytest.mark.parametrize(
|
||||
("to", "next_event", "saved_to"),
|
||||
(
|
||||
[
|
||||
("23:59:59", "2022-08-10T23:59:59-07:00", "23:59:59"),
|
||||
("24:00", "2022-08-11T00:00:00-07:00", "24:00:00"),
|
||||
("24:00:00", "2022-08-11T00:00:00-07:00", "24:00:00"),
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_update(
|
||||
hass: HomeAssistant,
|
||||
|
@ -665,11 +665,11 @@ async def test_update(
|
|||
@pytest.mark.freeze_time("2022-08-11 8:52:00-07:00")
|
||||
@pytest.mark.parametrize(
|
||||
("to", "next_event", "saved_to"),
|
||||
(
|
||||
[
|
||||
("14:00:00", "2022-08-15T14:00:00-07:00", "14:00:00"),
|
||||
("24:00", "2022-08-16T00:00:00-07:00", "24:00:00"),
|
||||
("24:00:00", "2022-08-16T00:00:00-07:00", "24:00:00"),
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_ws_create(
|
||||
hass: HomeAssistant,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue