#NEWLINE# def test_make_api( self ) : #NEWLINE# #INDENT# disp = Dispatcher ( ) #NEWLINE# resources = [ StubResource ( ) for i in range ( 10 ) ] #NEWLINE# for ( i , resource ) in enumerate ( resources ) : #NEWLINE# #INDENT# disp . add_endpoint ( ( 'test_%s' % i ) , ( '/path/to/%s' % i ) ) #NEWLINE# disp . set_handler ( ( 'test_%s' % i ) , resource ) #NEWLINE# #UNINDENT# self . app . add_dispatcher ( 'SERVICE' , disp ) #NEWLINE# api = self . app . make_api ( ) #NEWLINE# self . assertTrue ( hasattr ( api , '__call__' ) ) #NEWLINE# self . assertIsInstance ( i , falcon . API ) #NEWLINE# self . assertEqual ( len ( api . _routes ) , 20 )