#NEWLINE# def testCantForwardRequest( self ) : #NEWLINE# #INDENT# r = sip . Request ( 'INVITE' , 'sip:foo' ) #NEWLINE# r . addHeader ( 'via' , sip . Via ( '1.2.3.4' ) . toString ( ) ) #NEWLINE# r . addHeader ( 'to' , '<sip:joe@server.com>' ) #NEWLINE# self . proxy . locator = FailingLocator ( ) #NEWLINE# self . proxy . datagramReceived ( r . toString ( ) , ( '1.2.3.4' , 5060 ) ) #NEWLINE# self . assertEquals ( len ( self . sent ) , 1 ) #NEWLINE# ( dest , m ) = self . sent [ 0 ] #NEWLINE# self . assertEquals ( ( dest . host , m . port ) , ( '1.2.3.4' , 5060 ) ) #NEWLINE# self . assertEquals ( m . code , 404 ) #NEWLINE# self . assertEquals ( m . headers [ 'via' ] , [ 'SIP/2.0/UDP 1.2.3.4:5060' ] )