mirror of
https://github.com/home-assistant/core.git
synced 2026-09-08 02:35:02 -05:00
@@ -232,3 +232,12 @@ async def test_ssl_profile_change_modern(hass):
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert len(mock_context.mock_calls) == 1
|
||||
|
||||
|
||||
async def test_cors_defaults(hass):
|
||||
"""Test the CORS default settings."""
|
||||
with patch("homeassistant.components.http.setup_cors") as mock_setup:
|
||||
assert await async_setup_component(hass, "http", {})
|
||||
|
||||
assert len(mock_setup.mock_calls) == 1
|
||||
assert mock_setup.mock_calls[0][1][1] == ["https://cast.home-assistant.io"]
|
||||
|
||||
@@ -103,7 +103,7 @@ def test_secrets(isfile_patch, loop):
|
||||
assert res["components"].keys() == {"homeassistant", "http"}
|
||||
assert res["components"]["http"] == {
|
||||
"api_password": "abc123",
|
||||
"cors_allowed_origins": [],
|
||||
"cors_allowed_origins": ["https://cast.home-assistant.io"],
|
||||
"ip_ban_enabled": True,
|
||||
"login_attempts_threshold": -1,
|
||||
"server_host": "0.0.0.0",
|
||||
|
||||
Reference in New Issue
Block a user