mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 08:47:57 +00:00
Use a fully mocked credential (#45707)
This commit is contained in:
parent
bcc9add0b4
commit
af68d5fb41
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user