Use builtin TimeoutError [t-z] (#109683)
This commit is contained in:
parent
438d3b01b9
commit
8b0c9d3d18
63 changed files with 88 additions and 122 deletions
|
@ -1,5 +1,4 @@
|
|||
"""Test UniFi Network."""
|
||||
import asyncio
|
||||
from copy import deepcopy
|
||||
from datetime import timedelta
|
||||
from http import HTTPStatus
|
||||
|
@ -421,7 +420,7 @@ async def test_reconnect_mechanism(
|
|||
@pytest.mark.parametrize(
|
||||
"exception",
|
||||
[
|
||||
asyncio.TimeoutError,
|
||||
TimeoutError,
|
||||
aiounifi.BadGateway,
|
||||
aiounifi.ServiceUnavailable,
|
||||
aiounifi.AiounifiException,
|
||||
|
@ -459,7 +458,7 @@ async def test_get_unifi_controller_verify_ssl_false(hass: HomeAssistant) -> Non
|
|||
@pytest.mark.parametrize(
|
||||
("side_effect", "raised_exception"),
|
||||
[
|
||||
(asyncio.TimeoutError, CannotConnect),
|
||||
(TimeoutError, CannotConnect),
|
||||
(aiounifi.BadGateway, CannotConnect),
|
||||
(aiounifi.Forbidden, CannotConnect),
|
||||
(aiounifi.ServiceUnavailable, CannotConnect),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue