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

Commit e0bd90c

Browse files
committed
Fixup deque-based test breakages.
1 parent 93bb280 commit e0bd90c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

test/test_hyper.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def test_literal_header_field_with_indexing(self):
338338
result = b'\x00\x0acustom-key\x0dcustom-header'
339339

340340
assert e.encode(header_set, huffman=False) == result
341-
assert e.header_table == [
341+
assert list(e.header_table) == [
342342
(n.encode('utf-8'), v.encode('utf-8')) for n, v in header_set.items()
343343
]
344344

@@ -352,7 +352,7 @@ def test_literal_header_field_without_indexing(self):
352352
result = b'\x44\x0c/sample/path'
353353

354354
assert e.encode(header_set, huffman=False) == result
355-
assert e.header_table == []
355+
assert list(e.header_table) == []
356356

357357
def test_indexed_header_field(self):
358358
"""
@@ -365,7 +365,7 @@ def test_indexed_header_field(self):
365365
result = b'\x82'
366366

367367
assert e.encode(header_set, huffman=False) == result
368-
assert e.header_table == [
368+
assert list(e.header_table) == [
369369
(n.encode('utf-8'), v.encode('utf-8')) for n, v in header_set.items()
370370
]
371371

@@ -376,7 +376,7 @@ def test_indexed_header_field_from_static_table(self):
376376
result = b'\x82'
377377

378378
assert e.encode(header_set, huffman=False) == result
379-
assert e.header_table == []
379+
assert list(e.header_table) == []
380380

381381
def test_request_examples_without_huffman(self):
382382
"""
@@ -395,7 +395,7 @@ def test_request_examples_without_huffman(self):
395395
first_result = b'\x82\x87\x86\x44\x0fwww.example.com'
396396

397397
assert e.encode(first_header_set, huffman=False) == first_result
398-
assert e.header_table == [
398+
assert list(e.header_table) == [
399399
(n.encode('utf-8'), v.encode('utf-8')) for n, v in first_header_table
400400
]
401401

@@ -411,7 +411,7 @@ def test_request_examples_without_huffman(self):
411411
second_result = b'\x44\x0fwww.example.com\x5a\x08no-cache'
412412

413413
assert e.encode(second_header_set, huffman=False) == second_result
414-
assert e.header_table == [
414+
assert list(e.header_table) == [
415415
(n.encode('utf-8'), v.encode('utf-8')) for n, v in first_header_table
416416
]
417417

@@ -454,7 +454,7 @@ def test_request_examples_with_huffman(self):
454454
)
455455

456456
assert e.encode(first_header_set, huffman=True) == first_result
457-
assert e.header_table == [
457+
assert list(e.header_table) == [
458458
(n.encode('utf-8'), v.encode('utf-8')) for n, v in first_header_table
459459
]
460460

@@ -470,7 +470,7 @@ def test_request_examples_with_huffman(self):
470470
second_result = b'\x44\x8b\xdb\x6d\x88\x3e\x68\xd1\xcb\x12\x25\xba\x7f\x5a\x86\x63\x65\x4a\x13\x98\xff'
471471

472472
assert e.encode(second_header_set, huffman=True) == second_result
473-
assert e.header_table == [
473+
assert list(e.header_table) == [
474474
(n.encode('utf-8'), v.encode('utf-8')) for n, v in first_header_table
475475
]
476476

@@ -507,7 +507,7 @@ def test_literal_header_field_with_indexing(self):
507507
data = b'\x00\x0acustom-key\x0dcustom-header'
508508

509509
assert d.decode(data) == header_set
510-
assert d.header_table == [
510+
assert list(d.header_table) == [
511511
(n.encode('utf-8'), v.encode('utf-8')) for n, v in header_set
512512
]
513513

@@ -521,7 +521,7 @@ def test_literal_header_field_without_indexing(self):
521521
data = b'\x44\x0c/sample/path'
522522

523523
assert d.decode(data) == header_set
524-
assert d.header_table == []
524+
assert list(d.header_table) == []
525525

526526
def test_indexed_header_field(self):
527527
"""
@@ -534,7 +534,7 @@ def test_indexed_header_field(self):
534534
data = b'\x82'
535535

536536
assert d.decode(data) == header_set
537-
assert d.header_table == [
537+
assert list(d.header_table) == [
538538
(n.encode('utf-8'), v.encode('utf-8')) for n, v in header_set
539539
]
540540

@@ -555,7 +555,7 @@ def test_request_examples_without_huffman(self):
555555
first_data = b'\x82\x87\x86\x44\x0fwww.example.com'
556556

557557
assert d.decode(first_data) == set(first_header_set)
558-
assert d.header_table == [
558+
assert list(d.header_table) == [
559559
(n.encode('utf-8'), v.encode('utf-8')) for n, v in first_header_table
560560
]
561561

@@ -571,7 +571,7 @@ def test_request_examples_without_huffman(self):
571571
second_data = b'\x44\x0fwww.example.com\x5a\x08no-cache'
572572

573573
assert d.decode(second_data) == set(second_header_set)
574-
assert d.header_table == [
574+
assert list(d.header_table) == [
575575
(n.encode('utf-8'), v.encode('utf-8')) for n, v in first_header_table
576576
]
577577

@@ -617,7 +617,7 @@ def test_request_examples_with_huffman(self):
617617
)
618618

619619
assert d.decode(first_data) == set(first_header_set)
620-
assert d.header_table == [
620+
assert list(d.header_table) == [
621621
(n.encode('utf-8'), v.encode('utf-8')) for n, v in first_header_table
622622
]
623623

@@ -634,7 +634,7 @@ def test_request_examples_with_huffman(self):
634634
second_data = b'\x1b\x86\x63\x65\x4a\x13\x98\xff'
635635

636636
assert d.decode(second_data) == set(second_header_set)
637-
assert d.header_table == [
637+
assert list(d.header_table) == [
638638
(n.encode('utf-8'), v.encode('utf-8')) for n, v in second_header_table
639639
]
640640

0 commit comments

Comments
 (0)