#NEWLINE# def test_get_sorted_methods2( self ) : #NEWLINE# #INDENT# test_method_info = ( ( 'name1' , 'abcdefghi' , 'GET' ) , ( 'name2' , 'foo' , 'GET' ) , ( 'name3' , 'greetings' , 'GET' ) , ( 'name4' , 'bar' , 'POST' ) , ( 'name5' , 'baz' , 'GET' ) , ( 'name6' , 'baz' , 'PUT' ) , ( 'name7' , 'baz' , 'DELETE' ) ) #NEWLINE# methods = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( method_name , path , http_method ) in test_method_info : #NEWLINE# #INDENT# method = { #NEWLINE# #INDENT# 'httpMethod' : http_method , #NEWLINE# 'path' : path , #NEWLINE# #UNINDENT# } #NEWLINE# methods [ method_name ] = method #NEWLINE# #UNINDENT# sorted_methods = self . config_manager . _get_sorted_methods ( methods ) #NEWLINE# expected_data = [ ( 'name1' , 'abcdefghi' , 'GET' ) , ( 'name4' , 'bar' , 'POST' ) , ( 'name7' , 'baz' , 'DELETE' ) , ( 'name5' , 'baz' , 'GET' ) , ( 'name6' , 'baz' , 'PUT' ) , ( 'name2' , 'foo' , 'GET' ) , ( 'name3' , 'greetings' , 'GET' ) ] #NEWLINE# expected_methods = [ ( name , { #NEWLINE# #INDENT# 'httpMethod' : http_method , #NEWLINE# 'path' : path , #NEWLINE# #UNINDENT# } ) for ( name , path , http_method ) in expected_data ] #NEWLINE# self . assertEqual ( expected_methods , sorted_methods )