diff --git a/tests/components/evohome/conftest.py b/tests/components/evohome/conftest.py index 82c5cd76024..6d956e99454 100644 --- a/tests/components/evohome/conftest.py +++ b/tests/components/evohome/conftest.py @@ -109,7 +109,7 @@ async def block_request( @pytest.fixture -def evo_config() -> dict[str, str]: +def config() -> dict[str, str]: "Return a default/minimal configuration." return { CONF_USERNAME: USERNAME, diff --git a/tests/components/evohome/test_init.py b/tests/components/evohome/test_init.py index ad688d04882..cf610d2e664 100644 --- a/tests/components/evohome/test_init.py +++ b/tests/components/evohome/test_init.py @@ -15,7 +15,7 @@ from .const import TEST_INSTALLS @pytest.mark.parametrize("install", TEST_INSTALLS) async def test_entities( hass: HomeAssistant, - evo_config: dict[str, str], + config: dict[str, str], install: str, snapshot: SnapshotAssertion, freezer: FrozenDateTimeFactory, @@ -25,6 +25,6 @@ async def test_entities( # some extended state attrs are relative the current time freezer.move_to("2024-07-10 12:00:00+00:00") - await setup_evohome(hass, evo_config, install=install) + await setup_evohome(hass, config, install=install) assert hass.states.async_all() == snapshot diff --git a/tests/components/evohome/test_storage.py b/tests/components/evohome/test_storage.py index e44f98651fd..3d0c158a30f 100644 --- a/tests/components/evohome/test_storage.py +++ b/tests/components/evohome/test_storage.py @@ -87,14 +87,14 @@ DOMAIN_STORAGE_BASE: Final = { async def test_auth_tokens_null( hass: HomeAssistant, hass_storage: dict[str, Any], - evo_config: dict[str, str], + config: dict[str, str], idx: str, ) -> None: """Test loading/saving authentication tokens when no cached tokens in the store.""" hass_storage[DOMAIN] = DOMAIN_STORAGE_BASE | {"data": TEST_STORAGE_NULL[idx]} - mock_client = await setup_evohome(hass, evo_config, install="minimal") + mock_client = await setup_evohome(hass, config, install="minimal") # Confirm client was instantiated without tokens, as cache was empty... assert SZ_REFRESH_TOKEN not in mock_client.call_args.kwargs @@ -117,14 +117,14 @@ async def test_auth_tokens_null( async def test_auth_tokens_same( hass: HomeAssistant, hass_storage: dict[str, Any], - evo_config: dict[str, str], + config: dict[str, str], idx: str, ) -> None: """Test loading/saving authentication tokens when matching username.""" hass_storage[DOMAIN] = DOMAIN_STORAGE_BASE | {"data": TEST_STORAGE_DATA[idx]} - mock_client = await setup_evohome(hass, evo_config, install="minimal") + mock_client = await setup_evohome(hass, config, install="minimal") # Confirm client was instantiated with the cached tokens... assert mock_client.call_args.kwargs[SZ_REFRESH_TOKEN] == REFRESH_TOKEN @@ -146,7 +146,7 @@ async def test_auth_tokens_same( async def test_auth_tokens_past( hass: HomeAssistant, hass_storage: dict[str, Any], - evo_config: dict[str, str], + config: dict[str, str], idx: str, ) -> None: """Test loading/saving authentication tokens with matching username, but expired.""" @@ -159,7 +159,7 @@ async def test_auth_tokens_past( hass_storage[DOMAIN] = DOMAIN_STORAGE_BASE | {"data": test_data} - mock_client = await setup_evohome(hass, evo_config, install="minimal") + mock_client = await setup_evohome(hass, config, install="minimal") # Confirm client was instantiated with the cached tokens... assert mock_client.call_args.kwargs[SZ_REFRESH_TOKEN] == REFRESH_TOKEN @@ -184,7 +184,7 @@ async def test_auth_tokens_past( async def test_auth_tokens_diff( hass: HomeAssistant, hass_storage: dict[str, Any], - evo_config: dict[str, str], + config: dict[str, str], idx: str, ) -> None: """Test loading/saving authentication tokens when unmatched username.""" @@ -192,7 +192,7 @@ async def test_auth_tokens_diff( hass_storage[DOMAIN] = DOMAIN_STORAGE_BASE | {"data": TEST_STORAGE_DATA[idx]} mock_client = await setup_evohome( - hass, evo_config | {CONF_USERNAME: USERNAME_DIFF}, install="minimal" + hass, config | {CONF_USERNAME: USERNAME_DIFF}, install="minimal" ) # Confirm client was instantiated without tokens, as username was different...