mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 15:17:35 +00:00
Fix implicit-return in websocket_api tests (#122779)
This commit is contained in:
parent
2102a104d2
commit
7b08e625b4
@ -77,13 +77,15 @@ async def test_exception_handling(
|
|||||||
refresh_token = Mock()
|
refresh_token = Mock()
|
||||||
hass.data[DOMAIN] = {}
|
hass.data[DOMAIN] = {}
|
||||||
|
|
||||||
def get_extra_info(key: str) -> Any:
|
def get_extra_info(key: str) -> Any | None:
|
||||||
if key == "sslcontext":
|
if key == "sslcontext":
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if key == "peername":
|
if key == "peername":
|
||||||
return ("127.0.0.42", 8123)
|
return ("127.0.0.42", 8123)
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
mocked_transport = Mock()
|
mocked_transport = Mock()
|
||||||
mocked_transport.get_extra_info = get_extra_info
|
mocked_transport.get_extra_info = get_extra_info
|
||||||
mocked_request = make_mocked_request(
|
mocked_request = make_mocked_request(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user