#NEWLINE# def test_processWithPort( self ) : #NEWLINE# #INDENT# '\n        Check that L{ProxyRequest.process} correctly parse port in the incoming\n        URL, and create a outgoing connection with this port.\n        ' #NEWLINE# transport = StringTransportWithDisconnection ( ) #NEWLINE# channel = DummyChannel ( transport ) #NEWLINE# reactor = MemoryReactor ( ) #NEWLINE# request = ProxyRequest ( channel , False , reactor ) #NEWLINE# request . gotLength ( 0 ) #NEWLINE# request . requestReceived ( 'GET' , 'http://example.com:1234/foo/bar' , 'HTTP/1.0' ) #NEWLINE# self . assertEquals ( len ( reactor . tcpClients ) , 1 ) #NEWLINE# self . assertEquals ( reactor . tcpClients [ 0 ] [ 0 ] , 'example.com' ) #NEWLINE# self . assertEquals ( reactor . tcpClients [ 0 ] [ 1 ] , 1234 )