Skip to content

Commit

Permalink
Fix pylint errors in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Dec 2, 2021
1 parent 7b3148c commit 3b8293a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions tests/test_hap_protocol.py
Expand Up @@ -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()


Expand Down Expand Up @@ -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()


Expand All @@ -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()


Expand Down
6 changes: 3 additions & 3 deletions tests/test_hap_server.py
Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3b8293a

Please sign in to comment.