#NEWLINE# def test_routes( self ) : #NEWLINE# #INDENT# '\n        L{getRoutes} returns all the defined routes and their attributes.\n        ' #NEWLINE# app = Klein ( ) #NEWLINE# def f( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# f . attr = 'attr' #NEWLINE# def g( ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# g . attr = 'G' #NEWLINE# app . route ( b'/' , methods = [ b'GET' ] ) ( f ) #NEWLINE# app . route ( b'/g' , methods = [ b'PUT' , b'OPTIONS' ] ) ( self ) #NEWLINE# routes = sorted ( getRoutes ( app ) ) #NEWLINE# self . assertEqual ( routes , [ KleinRoute ( methods = { b'GET' } , path = b'/' , endpoint = 'f' , attributes = { #NEWLINE# #INDENT# 'attr' : 'attr' , #NEWLINE# #UNINDENT# } ) , KleinRoute ( methods = { b'PUT' , b'OPTIONS' } , path = b'/g' , endpoint = 'g' , attributes = { #NEWLINE# #INDENT# 'attr' : 'G' , #NEWLINE# #UNINDENT# } ) ] )