Improve type hints in hassio tests (#121221)
This commit is contained in:
parent
dcef25c0fa
commit
b054c037fe
10 changed files with 135 additions and 97 deletions
|
@ -79,8 +79,9 @@ def mock_all(aioclient_mock: AiohttpClientMocker) -> None:
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("hassio_env")
|
||||
async def test_ws_subscription(
|
||||
hassio_env, hass: HomeAssistant, hass_ws_client: WebSocketGenerator
|
||||
hass: HomeAssistant, hass_ws_client: WebSocketGenerator
|
||||
) -> None:
|
||||
"""Test websocket subscription."""
|
||||
assert await async_setup_component(hass, "hassio", {})
|
||||
|
@ -116,8 +117,8 @@ async def test_ws_subscription(
|
|||
assert response["success"]
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("hassio_env")
|
||||
async def test_websocket_supervisor_api(
|
||||
hassio_env,
|
||||
hass: HomeAssistant,
|
||||
hass_ws_client: WebSocketGenerator,
|
||||
aioclient_mock: AiohttpClientMocker,
|
||||
|
@ -160,8 +161,8 @@ async def test_websocket_supervisor_api(
|
|||
}
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("hassio_env")
|
||||
async def test_websocket_supervisor_api_error(
|
||||
hassio_env,
|
||||
hass: HomeAssistant,
|
||||
hass_ws_client: WebSocketGenerator,
|
||||
aioclient_mock: AiohttpClientMocker,
|
||||
|
@ -189,8 +190,8 @@ async def test_websocket_supervisor_api_error(
|
|||
assert msg["error"]["message"] == "example error"
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("hassio_env")
|
||||
async def test_websocket_supervisor_api_error_without_msg(
|
||||
hassio_env,
|
||||
hass: HomeAssistant,
|
||||
hass_ws_client: WebSocketGenerator,
|
||||
aioclient_mock: AiohttpClientMocker,
|
||||
|
@ -218,8 +219,8 @@ async def test_websocket_supervisor_api_error_without_msg(
|
|||
assert msg["error"]["message"] == ""
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("hassio_env")
|
||||
async def test_websocket_non_admin_user(
|
||||
hassio_env,
|
||||
hass: HomeAssistant,
|
||||
hass_ws_client: WebSocketGenerator,
|
||||
aioclient_mock: AiohttpClientMocker,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue