mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 16:57:53 +00:00
Prevent opening of sockets in onboarding tests (#56443)
This commit is contained in:
parent
a54854d129
commit
5c717cbb1d
@ -325,10 +325,16 @@ async def test_onboarding_integration_invalid_redirect_uri(
|
||||
|
||||
client = await hass_client()
|
||||
|
||||
resp = await client.post(
|
||||
"/api/onboarding/integration",
|
||||
json={"client_id": CLIENT_ID, "redirect_uri": "http://invalid-redirect.uri"},
|
||||
)
|
||||
with patch(
|
||||
"homeassistant.components.auth.indieauth.fetch_redirect_uris", return_value=[]
|
||||
):
|
||||
resp = await client.post(
|
||||
"/api/onboarding/integration",
|
||||
json={
|
||||
"client_id": CLIENT_ID,
|
||||
"redirect_uri": "http://invalid-redirect.uri",
|
||||
},
|
||||
)
|
||||
|
||||
assert resp.status == 400
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user