8000 Add panel build type by balloob · Pull Request #10589 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add panel build type #10589

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/hassio.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}

NO_AUTH = {
re.compile(r'^panel$'), re.compile(r'^addons/[^/]*/logo$')
re.compile(r'^panel_(es5|latest)$'), re.compile(r'^addons/[^/]*/logo$')
}

SCHEMA_ADDON = vol.Schema({
Expand Down
6 changes: 4 additions & 2 deletions tests/components/test_hassio.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ def test_auth_required_forward_request(hassio_client):


@asyncio.coroutine
def test_forward_request_no_auth_for_panel(hassio_client):
@pytest.mark.parametrize('build_type', ['es5', 'latest'])
def test_forward_request_no_auth_for_panel(hassio_client, build_type):
"""Test no auth needed for ."""
response = MagicMock()
response.read.return_value = mock_coro('data')
Expand All @@ -240,7 +241,8 @@ def test_forward_request_no_auth_for_panel(hassio_client):
Mock(return_value=mock_coro(response))), \
patch('homeassistant.components.hassio._create_response') as mresp:
mresp.return_value = 'response'
resp = yield from hassio_client.get('/api/hassio/panel')
resp = yield from hassio_client.get(
'/api/hassio/panel_{}'.format(build_type))

# Check we got right response
assert resp.status == 200
Expand Down
0