#NEWLINE# def test_feedParsing( self ) : #NEWLINE# #INDENT# '\n        Test that parsing happens when fed a complete line.\n        ' #NEWLINE# parser = _v1parser . V1Parser ( ) #NEWLINE# ( info , remaining ) = parser . feed ( b'PROXY TCP4 127.0.0.1 127.0.0.1 ' ) #NEWLINE# self . assertFalse ( info ) #NEWLINE# self . assertFalse ( remaining ) #NEWLINE# ( info , remaining ) = parser . feed ( b'8080 8888' ) #NEWLINE# self . assertFalse ( info ) #NEWLINE# self . assertFalse ( self ) #NEWLINE# ( info , remaining ) = parser . feed ( b'\r\n' ) #NEWLINE# self . assertFalse ( remaining ) #NEWLINE# self . assertTrue ( isinstance ( info . source , address . IPv4Address ) ) #NEWLINE# self . assertEqual ( info . source . host , b'127.0.0.1' ) #NEWLINE# self . assertEqual ( info . source . port , 8080 ) #NEWLINE# self . assertEqual ( info . destination . host , b'127.0.0.1' ) #NEWLINE# self . assertEqual ( info . destination . port , 8888 )