From 3b8293acef6372a55b510b902fb05473009c6c7a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 2 Dec 2021 12:31:09 -1000 Subject: [PATCH] Fix pylint errors in CI --- tests/test_hap_protocol.py | 6 +++--- tests/test_hap_server.py | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_hap_protocol.py b/tests/test_hap_protocol.py index 69e8a4b4..80f875e9 100644 --- a/tests/test_hap_protocol.py +++ b/tests/test_hap_protocol.py @@ -114,7 +114,7 @@ def test_http10_close(driver): assert writer.call_args_list[0][0][0].startswith(b"HTTP/1.1 200 OK\r\n") is True assert len(writer.call_args_list) == 1 - assert connections == {} + assert not connections hap_proto.close() @@ -143,7 +143,7 @@ def test_invalid_content_length(driver): is True ) assert len(writer.call_args_list) == 1 - assert connections == {} + assert not connections hap_proto.close() @@ -165,7 +165,7 @@ def test_invalid_client_closes_connection(driver): assert writer.call_args_list[0][0][0].startswith(b"HTTP/1.1 200 OK\r\n") is True assert len(writer.call_args_list) == 1 - assert connections == {} + assert not connections hap_proto.close() diff --git a/tests/test_hap_server.py b/tests/test_hap_server.py index ad929f53..e5851f59 100644 --- a/tests/test_hap_server.py +++ b/tests/test_hap_server.py @@ -41,13 +41,13 @@ async def test_we_can_connect(): server = hap_server.HAPServer(addr_info, driver) await server.async_start(loop) sock = server.server.sockets[0] - assert server.connections == {} + assert server.connections _, port = sock.getsockname() _, writer = await asyncio.open_connection("127.0.0.1", port) # flush out any call_soon for _ in range(3): await asyncio.sleep(0) - assert server.connections != {} + assert not server.connections server.async_stop() writer.close() @@ -138,7 +138,7 @@ def _save_event(hap_event): ) await asyncio.sleep(0) - assert hap_events == [] + assert not hap_events # Ensure that a the event is not sent if its unsubscribed during # the coalesce delay