mirror of
https://github.com/home-assistant/core.git
synced 2026-12-02 19:57:03 -04:00
Remove unreachable domain check from Tesla Fleet registration step (#191895)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude
parent
40ee10e802
commit
02c012ba6f
@@ -230,8 +230,7 @@ class OAuth2FlowHandler(
|
||||
if user_input is not None and self.uid and self.data:
|
||||
return self.async_create_entry(title=self.uid, data=self.data)
|
||||
|
||||
if not self.domain:
|
||||
return await self.async_step_domain_input()
|
||||
assert self.domain
|
||||
|
||||
virtual_key_url = f"https://www.tesla.com/_ak/{self.domain}"
|
||||
data_schema = probatio.Schema({}).extend(
|
||||
|
||||
@@ -21,7 +21,6 @@ from homeassistant.components.application_credentials import (
|
||||
ClientCredential,
|
||||
async_import_client_credential,
|
||||
)
|
||||
from homeassistant.components.tesla_fleet.config_flow import OAuth2FlowHandler
|
||||
from homeassistant.components.tesla_fleet.const import (
|
||||
AUTHORIZE_URL,
|
||||
DOMAIN,
|
||||
@@ -917,21 +916,6 @@ async def test_region_default_fallback(
|
||||
assert region_key.default() == "na"
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("current_request_with_host")
|
||||
async def test_registration_complete_no_domain(
|
||||
hass: HomeAssistant,
|
||||
) -> None:
|
||||
"""Test registration complete step without domain."""
|
||||
|
||||
flow_instance = OAuth2FlowHandler()
|
||||
flow_instance.hass = hass
|
||||
flow_instance.domain = None
|
||||
|
||||
result = await flow_instance.async_step_registration_complete({})
|
||||
assert result["type"] is FlowResultType.FORM
|
||||
assert result["step_id"] == "domain_input"
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("current_request_with_host")
|
||||
async def test_reauthentication(
|
||||
hass: HomeAssistant,
|
||||
|
||||
Reference in New Issue
Block a user