#NEWLINE# @ defer . inlineCallbacks #NEWLINE# def test_add_StaticMORoute_smpps( self ) : #NEWLINE# #INDENT# rorder = '10' #NEWLINE# rtype = 'StaticMORoute' #NEWLINE# cid = 'smppuser' #NEWLINE# typed_cid = ( 'smpps(%s)' % cid ) #NEWLINE# fid = 'f1' #NEWLINE# _str_ = ( '%s to %s NOT RATED' % ( rtype , re . escape ( typed_cid ) ) ) #NEWLINE# extraCommands = [ { #NEWLINE# #INDENT# 'command' : ( 'order %s' % rorder ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'command' : ( 'type %s' % cid ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'command' : ( 'connector %s' % typed_cid ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'command' : ( 'filters %s' % fid ) , #NEWLINE# #UNINDENT# } ] #NEWLINE# ( yield self . add_moroute ( 'jcli : ' , extraCommands ) ) #NEWLINE# expectedList = [ ( '%s' % _str_ ) ] #NEWLINE# ( yield self . _test ( 'jcli : ' , [ { #NEWLINE# #INDENT# 'command' : ( 'morouter -s %s' % rorder ) , #NEWLINE# 'expect' : expectedList , #NEWLINE# #UNINDENT# } ] ) ) #NEWLINE# expectedList = [ '#Order Type                    Connector ID\\(s\\)                                  Filter\\(s\\)' , ( '#%s %s %s   <T>' % ( rorder . ljust ( 5 ) , rtype . ljust ( 23 ) , re . escape ( typed_cid ) . ljust ( 48 ) ) ) , 'Total MO Routes: 1' ] #NEWLINE# commands = [ { #NEWLINE# #INDENT# 'command' : 'morouter -l' , #NEWLINE# 'expect' : expectedList , #NEWLINE# #UNINDENT# } ] #NEWLINE# ( yield self . _test ( 'jcli : ' , commands ) )