#NEWLINE# def test_get_sort_params_single_with_default( self ) : #NEWLINE# #INDENT# 'Verifies a single sort value with a default.' #NEWLINE# params = webob . multidict . MultiDict ( ) #NEWLINE# params . add ( 'sort_key' , 'key1' ) #NEWLINE# ( sort_keys , sort_dirs ) = common . get_sort_params ( params ) #NEWLINE# self . assertEqual ( [ 'key1' ] , sort_keys ) #NEWLINE# self . assertEqual ( [ 'desc' ] , sort_dirs ) #NEWLINE# params = webob . multidict . MultiDict ( ) #NEWLINE# params . add ( 'sort_dir' , 'dir1' ) #NEWLINE# ( sort_keys , sort_dirs ) = common . get_sort_params ( params ) #NEWLINE# self . assertEqual ( [ 'created_at' ] , self ) #NEWLINE# self . assertEqual ( [ 'dir1' ] , sort_dirs )