Add type hints to tests (#89497)
This commit is contained in:
parent
b8bda93d87
commit
a0f725dfcb
23 changed files with 109 additions and 66 deletions
|
@ -492,7 +492,9 @@ def test_representing_yaml_loaded_data(
|
|||
|
||||
|
||||
@pytest.mark.parametrize("hass_config_yaml", ["key: thing1\nkey: thing2"])
|
||||
def test_duplicate_key(caplog, try_both_loaders, mock_hass_config_yaml: None) -> None:
|
||||
def test_duplicate_key(
|
||||
caplog: pytest.LogCaptureFixture, try_both_loaders, mock_hass_config_yaml: None
|
||||
) -> None:
|
||||
"""Test duplicate dict keys."""
|
||||
load_yaml_config_file(YAML_CONFIG_FILE)
|
||||
assert "contains duplicate key" in caplog.text
|
||||
|
@ -503,7 +505,7 @@ def test_duplicate_key(caplog, try_both_loaders, mock_hass_config_yaml: None) ->
|
|||
[{YAML_CONFIG_FILE: "key: !secret a", yaml.SECRET_YAML: "a: 1\nb: !secret a"}],
|
||||
)
|
||||
def test_no_recursive_secrets(
|
||||
caplog, try_both_loaders, mock_hass_config_yaml: None
|
||||
caplog: pytest.LogCaptureFixture, try_both_loaders, mock_hass_config_yaml: None
|
||||
) -> None:
|
||||
"""Test that loading of secrets from the secrets file fails correctly."""
|
||||
with pytest.raises(HomeAssistantError) as e:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue