diff --git a/tests/conftest.py b/tests/conftest.py index 27559e9659d..f6ef33e8f25 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -204,9 +204,13 @@ def mock_device_tracker_conf(): @pytest.fixture async def hass_admin_credential(hass, local_auth): """Provide credentials for admin user.""" - await hass.async_add_executor_job(local_auth.data.add_auth, "admin", "admin-pass") - - return await local_auth.async_get_or_create_credentials({"username": "admin"}) + return Credentials( + id="mock-credential-id", + auth_provider_type="homeassistant", + auth_provider_id=None, + data={"username": "admin"}, + is_new=False, + ) @pytest.fixture