Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit de2c677

Browse files
committed
Fixup linting errors in test/test_integration.py.
1 parent 35b5b04 commit de2c677

File tree

1 file changed

+24
-19
lines changed

1 file changed

+24
-19
lines changed

test/test_integration.py

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
# Cover our bases because NPN doesn't yet work on all our test platforms.
3737
hyper.http20.connection.H2_NPN_PROTOCOLS += ['', None]
3838

39+
3940
def decode_frame(frame_data):
4041
f, length = Frame.parse_frame_header(frame_data[:9])
4142
f.parse_body(memoryview(frame_data[9:9 + length]))
@@ -249,7 +250,7 @@ def socket_handler(listener):
249250
send_event.set()
250251

251252
# Check that we closed the connection.
252-
assert conn._sock == None
253+
assert conn._sock is None
253254

254255
self.tear_down()
255256

@@ -302,8 +303,10 @@ def socket_handler(listener):
302303
receive_preamble(sock)
303304
sock.recv(65535)
304305

305-
# Now, send the headers for the response. This response has no body.
306-
f = build_headers_frame([(':status', '204'), ('content-length', '0')])
306+
# Now, send the headers for the response. This response has no body
307+
f = build_headers_frame(
308+
[(':status', '204'), ('content-length', '0')]
309+
)
307310
f.flags.add('END_STREAM')
308311
f.stream_id = 1
309312
sock.send(f.serialize())
@@ -338,7 +341,6 @@ def socket_handler(listener):
338341
sock = listener.accept()[0]
339342

340343
e = Encoder()
341-
e.huffman_coder = HuffmanEncoder(REQUEST_CODES, REQUEST_CODES_LENGTH)
342344

343345
# We get two messages for the connection open and then a HEADERS
344346
# frame.
@@ -402,7 +404,6 @@ def socket_handler(listener):
402404
sock = listener.accept()[0]
403405

404406
e = Encoder()
405-
e.huffman_coder = HuffmanEncoder(REQUEST_CODES, REQUEST_CODES_LENGTH)
406407

407408
# We get two messages for the connection open and then a HEADERS
408409
# frame.
@@ -549,10 +550,11 @@ def socket_handler(listener):
549550

550551
h = HeadersFrame(1)
551552
h.data = self.get_encoder().encode(
552-
[(':status', 200),
553-
('content-type', 'not/real'),
554-
('content-length', 14),
555-
('server', 'socket-level-server')
553+
[
554+
(':status', 200),
555+
('content-type', 'not/real'),
556+
('content-length', 14),
557+
('server', 'socket-level-server')
556558
]
557559
)
558560
h.flags.add('END_HEADERS')
@@ -597,10 +599,11 @@ def socket_handler(listener):
597599

598600
h = HeadersFrame(1)
599601
h.data = self.get_encoder().encode(
600-
[(':status', 200),
601-
('content-type', 'not/real'),
602-
('content-length', 12),
603-
('server', 'socket-level-server')
602+
[
603+
(':status', 200),
604+
('content-type', 'not/real'),
605+
('content-length', 12),
606+
('server', 'socket-level-server')
604607
]
605608
)
606609
h.flags.add('END_HEADERS')
@@ -884,9 +887,10 @@ def socket_handler(listener):
884887
# Respond!
885888
h = HeadersFrame(1)
886889
h.data = self.get_encoder().encode(
887-
[(':status', 200),
888-
('content-type', 'not/real'),
889-
('content-length', 20),
890+
[
891+
(':status', 200),
892+
('content-type', 'not/real'),
893+
('content-length', 20),
890894
]
891895
)
892896
h.flags.add('END_HEADERS')
@@ -942,9 +946,10 @@ def socket_handler(listener):
942946
# Respond!
943947
h = HeadersFrame(1)
944948
h.data = self.get_encoder().encode(
945-
[(':status', 200),
946-
('content-type', 'not/real'),
947-
('content-length', 20),
949+
[
950+
(':status', 200),
951+
('content-type', 'not/real'),
952+
('content-length', 20),
948953
]
949954
)
950955
h.flags.add('END_HEADERS')

0 commit comments

Comments
 (0)