Remove legacy_api_password auth provider (#119976)
This commit is contained in:
parent
7d14b9c5c8
commit
bae008b0e2
11 changed files with 14 additions and 285 deletions
|
@ -12,9 +12,6 @@ import voluptuous as vol
|
|||
|
||||
from homeassistant import const
|
||||
from homeassistant.auth.models import Credentials
|
||||
from homeassistant.auth.providers.legacy_api_password import (
|
||||
LegacyApiPasswordAuthProvider,
|
||||
)
|
||||
from homeassistant.bootstrap import DATA_LOGGING
|
||||
import homeassistant.core as ha
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
@ -731,22 +728,6 @@ async def test_rendering_template_admin(
|
|||
assert resp.status == HTTPStatus.UNAUTHORIZED
|
||||
|
||||
|
||||
async def test_rendering_template_legacy_user(
|
||||
hass: HomeAssistant,
|
||||
mock_api_client: TestClient,
|
||||
aiohttp_client: ClientSessionGenerator,
|
||||
legacy_auth: LegacyApiPasswordAuthProvider,
|
||||
) -> None:
|
||||
"""Test rendering a template with legacy API password."""
|
||||
hass.states.async_set("sensor.temperature", 10)
|
||||
client = await aiohttp_client(hass.http.app)
|
||||
resp = await client.post(
|
||||
const.URL_API_TEMPLATE,
|
||||
json={"template": "{{ states.sensor.temperature.state }}"},
|
||||
)
|
||||
assert resp.status == HTTPStatus.UNAUTHORIZED
|
||||
|
||||
|
||||
async def test_api_call_service_not_found(
|
||||
hass: HomeAssistant, mock_api_client: TestClient
|
||||
) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue