#NEWLINE# def test_add_DateIntervalFilter( self ) : #NEWLINE# #INDENT# leftBorder = '2016-05-01' #NEWLINE# rightBorder = '2016-05-02' #NEWLINE# dateInterval = ( '%s;%s' % ( leftBorder , rightBorder ) ) #NEWLINE# ftype = 'DateIntervalFilter' #NEWLINE# _str_ = [ ( '%s:' % ftype ) , ( 'Left border = %s' % leftBorder ) , ( 'Right border = %s' % rightBorder ) ] #NEWLINE# _repr_ = ( '<DI \\(%s,%s\\)>' % ( leftBorder , rightBorder ) ) #NEWLINE# extraCommands = [ { #NEWLINE# #INDENT# 'command' : 'fid filter_id' , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'command' : ( 'type %s' % ftype ) , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'command' : ( 'dateInterval %s' % _str_ ) , #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 MT  %s' % ( ftype , _repr_ ) ) , 'Total Filters: 1' ] #NEWLINE# self . _test ( 'jcli : ' , [ { #NEWLINE# #INDENT# 'command' : 'filter -l' , #NEWLINE# 'expect' : expectedList , #NEWLINE# #UNINDENT# } ] )