#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def test_syntax_error( self ) : #NEWLINE# #INDENT# ( yield self . ipb_connect ( ) ) #NEWLINE# ( yield self . connect ( '127.0.0.1' , self . pbPort ) ) #NEWLINE# ( yield self . prepareRoutingsAndStartConnector ( ) ) #NEWLINE# _ic = self . stats_smppc . get ( 'interceptor_count' ) #NEWLINE# _iec = self . stats_smppc . get ( 'interceptor_error_count' ) #NEWLINE# ( yield self . smppc_factory . connectAndBind ( ) ) #NEWLINE# self . smppc_factory . lastProto . PDUDataRequestReceived = mock . Mock ( wraps = self . smppc_factory . lastProto . PDUDataRequestReceived ) #NEWLINE# ( yield self . triggerDeliverSmFromSMSC ( [ self . DeliverSmPDU ] ) ) #NEWLINE# self . assertEqual ( self . smppc_factory . lastProto . PDUDataRequestReceived . call_count , 0 ) #NEWLINE# self . assertEqual ( len ( self . SMSCPort . factory . lastClient . pduRecords ) , 2 ) #NEWLINE# sent_back_resp = self . SMSCPort . factory . lastClient . pduRecords [ 1 ] #NEWLINE# self . assertEqual ( sent_back_resp . id , pdu_types . CommandId . deliver_sm_resp ) #NEWLINE# self . assertEqual ( sent_back_resp . status , pdu_types . CommandStatus . ESME_RSYSERR ) #NEWLINE# self . assertEqual ( _ic , self . stats_smppc . get ( 'interceptor_count' ) ) #NEWLINE# self . assertEqual ( ( _iec + 1 ) , self . stats_smppc . get ( 'interceptor_error_count' ) ) #NEWLINE# ( yield self . smppc_factory . smpp . unbindAndDisconnect ( ) ) #NEWLINE# ( yield self . stopSmppClientConnectors ( ) )