mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 13:00:11 +00:00
Enable Ruff rule PT007 (#113764)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user