1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Use one regex for Hass.io URL check (#16710)

This commit is contained in:
Pascal Vizeli
2018-09-19 12:57:55 +02:00
committed by Paulus Schoutsen
parent 7f462ba0ec
commit d376049a3f
2 changed files with 27 additions and 24 deletions

View File

@@ -36,9 +36,13 @@ def test_forward_request(hassio_client):
@asyncio.coroutine
def test_auth_required_forward_request(hassio_client):
@pytest.mark.parametrize(
'build_type', [
'supervisor/info', 'homeassistant/update', 'host/info'
])
def test_auth_required_forward_request(hassio_client, build_type):
"""Test auth required for normal request."""
resp = yield from hassio_client.post('/api/hassio/beer')
resp = yield from hassio_client.post("/api/hassio/{}".format(build_type))
# Check we got right response
assert resp.status == 401