Fix pointless-string-statement pylint warning in emulated_hue tests (#119368)
parent
a3356f4ee6
commit
18f30d2ee9
|
@ -27,7 +27,7 @@ BRIDGE_SERVER_PORT = get_test_instance_port()
|
|||
class MockTransport:
|
||||
"""Mock asyncio transport."""
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self) -> None:
|
||||
"""Create a place to store the sends."""
|
||||
self.sends = []
|
||||
|
||||
|
@ -63,7 +63,7 @@ def hue_client(
|
|||
yield client
|
||||
|
||||
|
||||
async def setup_hue(hass):
|
||||
async def setup_hue(hass: HomeAssistant) -> None:
|
||||
"""Set up the emulated_hue integration."""
|
||||
with patch(
|
||||
"homeassistant.components.emulated_hue.async_create_upnp_datagram_endpoint"
|
||||
|
@ -82,7 +82,7 @@ def test_upnp_discovery_basic() -> None:
|
|||
mock_transport = MockTransport()
|
||||
upnp_responder_protocol.transport = mock_transport
|
||||
|
||||
"""Original request emitted by the Hue Bridge v1 app."""
|
||||
# Original request emitted by the Hue Bridge v1 app.
|
||||
request = """M-SEARCH * HTTP/1.1
|
||||
HOST:239.255.255.250:1900
|
||||
ST:ssdp:all
|
||||
|
@ -114,7 +114,7 @@ def test_upnp_discovery_rootdevice() -> None:
|
|||
mock_transport = MockTransport()
|
||||
upnp_responder_protocol.transport = mock_transport
|
||||
|
||||
"""Original request emitted by Busch-Jaeger free@home SysAP."""
|
||||
# Original request emitted by Busch-Jaeger free@home SysAP.
|
||||
request = """M-SEARCH * HTTP/1.1
|
||||
HOST: 239.255.255.250:1900
|
||||
MAN: "ssdp:discover"
|
||||
|
@ -146,7 +146,7 @@ def test_upnp_no_response() -> None:
|
|||
mock_transport = MockTransport()
|
||||
upnp_responder_protocol.transport = mock_transport
|
||||
|
||||
"""Original request emitted by the Hue Bridge v1 app."""
|
||||
# Original request emitted by the Hue Bridge v1 app.
|
||||
request = """INVALID * HTTP/1.1
|
||||
HOST:239.255.255.250:1900
|
||||
ST:ssdp:all
|
||||
|
@ -158,7 +158,7 @@ MX:3
|
|||
|
||||
upnp_responder_protocol.datagram_received(encoded_request, 1234)
|
||||
|
||||
assert mock_transport.sends == []
|
||||
assert not mock_transport.sends
|
||||
|
||||
|
||||
async def test_description_xml(hass: HomeAssistant, hue_client) -> None:
|
||||
|
|
Loading…
Reference in New Issue