#NEWLINE# def test_transfer_encoding_trailers_is_valid( self , frame_factory ) : #NEWLINE# #INDENT# '\n        Transfer-Encoding trailers is allowed by the filter.\n        ' #NEWLINE# headers = ( self . base_request_headers + [ ( 'te' , 'trailers' ) ] ) #NEWLINE# c = h2 . connection . H2Connection ( client_side = False ) #NEWLINE# c . receive_data ( frame_factory . preamble ( ) ) #NEWLINE# f = frame_factory . build_headers_frame ( frame_factory ) #NEWLINE# data = f . serialize ( ) #NEWLINE# events = c . receive_data ( data ) #NEWLINE# assert ( len ( events ) == 1 ) #NEWLINE# request_event = events [ 0 ] #NEWLINE# assert ( request_event . headers == headers )