#NEWLINE# def test_ouble_header( self ) : #NEWLINE# #INDENT# p = self . parser ( ) #NEWLINE# data = b'GET /test HTTP/1.1\r\n' #NEWLINE# p . execute ( data , len ( data ) ) #NEWLINE# data = b'Accept: */*\r\n' #NEWLINE# p . execute ( data , len ( data ) ) #NEWLINE# data = b'Accept: jpeg\r\n\r\n' #NEWLINE# p . execute ( data , len ( data ) ) #NEWLINE# self . assertTrue ( p . is_headers_complete ( ) ) #NEWLINE# self . assertTrue ( p . is_message_begin ( ) ) #NEWLINE# self . assertTrue ( p . is_message_complete ( ) ) #NEWLINE# headers = p . get_headers ( ) #NEWLINE# self . assertEqual ( len ( headers ) , 1 ) #NEWLINE# self . assertEqual ( headers . get ( 'Accept' ) , [ '*/*' , 'jpeg' ] )