Update i-j* tests to use entity & device registry fixtures (#103900)

This commit is contained in:
Jan-Philipp Benecke 2023-11-13 11:51:55 +01:00 committed by GitHub
parent be2cee228c
commit 92b3c0c96b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 199 additions and 151 deletions

View file

@ -679,11 +679,12 @@ async def test_calc_errors(hass: HomeAssistant, method) -> None:
assert round(float(state.state)) == 0 if method != "right" else 1
async def test_device_id(hass: HomeAssistant) -> None:
async def test_device_id(
hass: HomeAssistant,
device_registry: dr.DeviceRegistry,
entity_registry: er.EntityRegistry,
) -> None:
"""Test for source entity device for Riemann sum integral."""
device_registry = dr.async_get(hass)
entity_registry = er.async_get(hass)
source_config_entry = MockConfigEntry()
source_config_entry.add_to_hass(hass)
source_device_entry = device_registry.async_get_or_create(