Use issue_registry fixture in component tests (#118041)
This commit is contained in:
parent
cb62f4242e
commit
44f715bd02
31 changed files with 167 additions and 166 deletions
|
@ -424,7 +424,10 @@ async def test_binary_data_from_yaml_setup(
|
|||
|
||||
|
||||
async def test_issue_when_using_old_query(
|
||||
recorder_mock: Recorder, hass: HomeAssistant, caplog: pytest.LogCaptureFixture
|
||||
recorder_mock: Recorder,
|
||||
hass: HomeAssistant,
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
issue_registry: ir.IssueRegistry,
|
||||
) -> None:
|
||||
"""Test we create an issue for an old query that will do a full table scan."""
|
||||
|
||||
|
@ -433,7 +436,6 @@ async def test_issue_when_using_old_query(
|
|||
assert "Query contains entity_id but does not reference states_meta" in caplog.text
|
||||
|
||||
assert not hass.states.async_all()
|
||||
issue_registry = ir.async_get(hass)
|
||||
|
||||
config = YAML_CONFIG_FULL_TABLE_SCAN["sql"]
|
||||
|
||||
|
@ -457,6 +459,7 @@ async def test_issue_when_using_old_query_without_unique_id(
|
|||
hass: HomeAssistant,
|
||||
caplog: pytest.LogCaptureFixture,
|
||||
yaml_config: dict[str, Any],
|
||||
issue_registry: ir.IssueRegistry,
|
||||
) -> None:
|
||||
"""Test we create an issue for an old query that will do a full table scan."""
|
||||
|
||||
|
@ -465,7 +468,6 @@ async def test_issue_when_using_old_query_without_unique_id(
|
|||
assert "Query contains entity_id but does not reference states_meta" in caplog.text
|
||||
|
||||
assert not hass.states.async_all()
|
||||
issue_registry = ir.async_get(hass)
|
||||
|
||||
config = yaml_config["sql"]
|
||||
query = config[CONF_QUERY]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue