Fix pointless-string-statement pylint warning in emulated_hue tests (#119368)

pull/119392/head
epenet 2024-06-11 11:57:54 +02:00 committed by GitHub
parent a3356f4ee6
commit 18f30d2ee9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -27,7 +27,7 @@ BRIDGE_SERVER_PORT = get_test_instance_port()
class MockTransport: class MockTransport:
"""Mock asyncio transport.""" """Mock asyncio transport."""
def __init__(self): def __init__(self) -> None:
"""Create a place to store the sends.""" """Create a place to store the sends."""
self.sends = [] self.sends = []
@ -63,7 +63,7 @@ def hue_client(
yield client yield client
async def setup_hue(hass): async def setup_hue(hass: HomeAssistant) -> None:
"""Set up the emulated_hue integration.""" """Set up the emulated_hue integration."""
with patch( with patch(
"homeassistant.components.emulated_hue.async_create_upnp_datagram_endpoint" "homeassistant.components.emulated_hue.async_create_upnp_datagram_endpoint"
@ -82,7 +82,7 @@ def test_upnp_discovery_basic() -> None:
mock_transport = MockTransport() mock_transport = MockTransport()
upnp_responder_protocol.transport = mock_transport 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 request = """M-SEARCH * HTTP/1.1
HOST:239.255.255.250:1900 HOST:239.255.255.250:1900
ST:ssdp:all ST:ssdp:all
@ -114,7 +114,7 @@ def test_upnp_discovery_rootdevice() -> None:
mock_transport = MockTransport() mock_transport = MockTransport()
upnp_responder_protocol.transport = mock_transport 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 request = """M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900 HOST: 239.255.255.250:1900
MAN: "ssdp:discover" MAN: "ssdp:discover"
@ -146,7 +146,7 @@ def test_upnp_no_response() -> None:
mock_transport = MockTransport() mock_transport = MockTransport()
upnp_responder_protocol.transport = mock_transport 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 request = """INVALID * HTTP/1.1
HOST:239.255.255.250:1900 HOST:239.255.255.250:1900
ST:ssdp:all ST:ssdp:all
@ -158,7 +158,7 @@ MX:3
upnp_responder_protocol.datagram_received(encoded_request, 1234) 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: async def test_description_xml(hass: HomeAssistant, hue_client) -> None: