#NEWLINE# def test_eof( self ) : #NEWLINE# #INDENT# stream = asyncio . StreamReader ( loop = self . loop ) #NEWLINE# task = asyncio . Task ( HttpParser . parse ( stream ) , loop = self . loop ) #NEWLINE# self . loop . call_soon ( ( lambda : stream . feed_eof ( ) ) ) #NEWLINE# req = self . loop . run_until_complete ( task ) #NEWLINE# self . assertIs ( req , None ) #NEWLINE# req = self . loop . run_until_complete ( task ) #NEWLINE# transport = unittest . mock . Mock ( ) #NEWLINE# transport . get_extra_info . return_value = ( '127.0.0.1' , 1 ) #NEWLINE# stream = asyncio . StreamReader ( loop = self . loop ) #NEWLINE# stream . set_transport ( transport ) #NEWLINE# task = asyncio . Task ( HttpParser . parse ( transport ) , loop = self . loop ) #NEWLINE# def feed( ) : #NEWLINE# #INDENT# stream . feed_data ( b'GET / HTTP/1.1\r\n' ) #NEWLINE# stream . feed_eof ( ) #NEWLINE# #UNINDENT# self . loop . call_soon ( feed ) #NEWLINE# req = self . loop . run_until_complete ( task ) #NEWLINE# self . assertIs ( req , None )