mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +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
|
@pytest.fixture
|
||||||
async def hass_admin_credential(hass, local_auth):
|
async def hass_admin_credential(hass, local_auth):
|
||||||
"""Provide credentials for admin user."""
|
"""Provide credentials for admin user."""
|
||||||
await hass.async_add_executor_job(local_auth.data.add_auth, "admin", "admin-pass")
|
return Credentials(
|
||||||
|
id="mock-credential-id",
|
||||||
return await local_auth.async_get_or_create_credentials({"username": "admin"})
|
auth_provider_type="homeassistant",
|
||||||
|
auth_provider_id=None,
|
||||||
|
data={"username": "admin"},
|
||||||
|
is_new=False,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
Loading…
x
Reference in New Issue
Block a user