Skip to content

Commit bc5ecbf

Browse files
authored
Merge pull request #393 from bdraco/pylint_ci
Fix pylint errors in CI
2 parents 7b3148c + d449300 commit bc5ecbf

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

tests/test_hap_protocol.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_http10_close(driver):
114114

115115
assert writer.call_args_list[0][0][0].startswith(b"HTTP/1.1 200 OK\r\n") is True
116116
assert len(writer.call_args_list) == 1
117-
assert connections == {}
117+
assert not connections
118118
hap_proto.close()
119119

120120

@@ -143,7 +143,7 @@ def test_invalid_content_length(driver):
143143
is True
144144
)
145145
assert len(writer.call_args_list) == 1
146-
assert connections == {}
146+
assert not connections
147147
hap_proto.close()
148148

149149

@@ -165,7 +165,7 @@ def test_invalid_client_closes_connection(driver):
165165

166166
assert writer.call_args_list[0][0][0].startswith(b"HTTP/1.1 200 OK\r\n") is True
167167
assert len(writer.call_args_list) == 1
168-
assert connections == {}
168+
assert not connections
169169
hap_proto.close()
170170

171171

tests/test_hap_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ async def test_we_can_connect():
4141
server = hap_server.HAPServer(addr_info, driver)
4242
await server.async_start(loop)
4343
sock = server.server.sockets[0]
44-
assert server.connections == {}
44+
assert not server.connections
4545
_, port = sock.getsockname()
4646
_, writer = await asyncio.open_connection("127.0.0.1", port)
4747
# flush out any call_soon
4848
for _ in range(3):
4949
await asyncio.sleep(0)
50-
assert server.connections != {}
50+
assert server.connections
5151
server.async_stop()
5252
writer.close()
5353

@@ -138,7 +138,7 @@ def _save_event(hap_event):
138138
)
139139

140140
await asyncio.sleep(0)
141-
assert hap_events == []
141+
assert not hap_events
142142

143143
# Ensure that a the event is not sent if its unsubscribed during
144144
# the coalesce delay

0 commit comments

Comments
 (0)