#NEWLINE# def test_add_ConnectorFilter( self ) : #NEWLINE# #INDENT# cid = '1' #NEWLINE# ftype = 'ConnectorFilter' #NEWLINE# _str_ = [ ( '%s:' % ftype ) , ( 'cid = %s' % cid ) ] #NEWLINE# _repr_ = ( '<C \\(cid=%s\\)>' % cid ) #NEWLINE# extraCommands = [ { #NEWLINE# #INDENT# 'command' : 'fid filter_id' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'command' : ( 'type %s' % ftype ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'command' : ( 'cid %s' % cid ) , #NEWLINE# #UNINDENT# } ] #NEWLINE# self . add_filter ( 'jcli : ' , extraCommands ) #NEWLINE# expectedList = _str_ #NEWLINE# self . _test ( 'jcli : ' , [ { #NEWLINE# #INDENT# 'command' : 'filter -s filter_id' , #NEWLINE# 'expect' : expectedList , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# expectedList = [ '#Filter id        Type                   Routes Description' , ( '#filter_id        %s        MO     %s' % ( ftype , expectedList ) ) , 'Total Filters: 1' ] #NEWLINE# self . _test ( 'jcli : ' , [ { #NEWLINE# #INDENT# 'command' : 'filter -l' , #NEWLINE# 'expect' : expectedList , #NEWLINE# #UNINDENT# } ] )