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:
committed by
Paulus Schoutsen
parent
7f462ba0ec
commit
d376049a3f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user