Enable Ruff rule PT007 (#113764)

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Sid
2024-03-19 09:01:07 +01:00
committed by GitHub
parent 089a3ab6d7
commit 00ec7f11f0
204 changed files with 908 additions and 921 deletions

View File

@@ -35,7 +35,7 @@ async def setup_automation(
)
@pytest.mark.parametrize("automation_config", ({},))
@pytest.mark.parametrize("automation_config", [{}])
async def test_get_automation_config(
hass: HomeAssistant,
hass_client: ClientSessionGenerator,
@@ -58,7 +58,7 @@ async def test_get_automation_config(
assert result == {"id": "moon"}
@pytest.mark.parametrize("automation_config", ({},))
@pytest.mark.parametrize("automation_config", [{}])
async def test_update_automation_config(
hass: HomeAssistant,
hass_client: ClientSessionGenerator,
@@ -97,7 +97,7 @@ async def test_update_automation_config(
assert new_data[1] == {"id": "moon", "trigger": [], "condition": [], "action": []}
@pytest.mark.parametrize("automation_config", ({},))
@pytest.mark.parametrize("automation_config", [{}])
@pytest.mark.parametrize(
("updated_config", "validation_error"),
[
@@ -179,7 +179,7 @@ async def test_update_automation_config_with_error(
assert validation_error not in caplog.text
@pytest.mark.parametrize("automation_config", ({},))
@pytest.mark.parametrize("automation_config", [{}])
@pytest.mark.parametrize(
("updated_config", "validation_error"),
[
@@ -236,7 +236,7 @@ async def test_update_automation_config_with_blueprint_substitution_error(
assert validation_error not in caplog.text
@pytest.mark.parametrize("automation_config", ({},))
@pytest.mark.parametrize("automation_config", [{}])
async def test_update_remove_key_automation_config(
hass: HomeAssistant,
hass_client: ClientSessionGenerator,
@@ -275,7 +275,7 @@ async def test_update_remove_key_automation_config(
assert new_data[1] == {"id": "moon", "trigger": [], "condition": [], "action": []}
@pytest.mark.parametrize("automation_config", ({},))
@pytest.mark.parametrize("automation_config", [{}])
async def test_bad_formatted_automations(
hass: HomeAssistant,
hass_client: ClientSessionGenerator,
@@ -323,7 +323,7 @@ async def test_bad_formatted_automations(
@pytest.mark.parametrize(
"automation_config",
(
[
[
{
"id": "sun",
@@ -336,7 +336,7 @@ async def test_bad_formatted_automations(
"action": {"service": "test.automation"},
},
],
),
],
)
async def test_delete_automation(
hass: HomeAssistant,
@@ -378,7 +378,7 @@ async def test_delete_automation(
assert len(entity_registry.entities) == 1
@pytest.mark.parametrize("automation_config", ({},))
@pytest.mark.parametrize("automation_config", [{}])
async def test_api_calls_require_admin(
hass: HomeAssistant,
hass_client: ClientSessionGenerator,