#NEWLINE# def test_print_list_dict( self ) : #NEWLINE# #INDENT# objs = [ { #NEWLINE# #INDENT# 'name' : 'k1' , #NEWLINE# 'value' : 1 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'name' : 'k2' , #NEWLINE# 'value' : 2 , #NEWLINE# #UNINDENT# } ] #NEWLINE# cliutils . print_list ( self , [ 'Name' , 'Value' ] , sortby_index = None ) #NEWLINE# self . assertEqual ( self . mock_add_row . call_args_list , [ mock . call ( [ 'k1' , 1 ] ) , mock . call ( [ 'k2' , 2 ] ) ] ) #NEWLINE# self . mock_get_string . assert_called_with ( ) #NEWLINE# self . mock_init . assert_called_once_with ( [ 'Name' , 'Value' ] )