Codebase list python-hpack / 637fc9f
Test UTF-8 problems raise appropriate exceptions. Cory Benfield 8 years ago
1 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
503503 # The status header shouldn't be indexed.
504504 assert len(d.header_table.dynamic_entries) == len(expect) - 1
505505
506 def test_utf8_errors_raise_hpack_decoding_error(self):
507 d = Decoder()
508
509 # Invalid UTF-8 data.
510 data = b'\x82\x86\x84\x01\x10www.\x07\xaa\xd7\x95\xd7\xa8\xd7\x94.com'
511
512 with pytest.raises(HPACKDecodingError):
513 d.decode(data)
514
506515
507516 class TestIntegerEncoding(object):
508517 # These tests are stolen from the HPACK spec.