Пример #1
0
def create_app():
    """Method for creating the default app with keyard route"""
    app = falcon.API(middleware=[requireJSON()])
    keyard = resource.KeyardResource()
    app.add_route('/keyard', keyard)
    prepare_app(app)
    return app
Пример #2
0
 def before(self):
     self.api = falcon.API(middleware=[requireJSON()])
     self.resource = resource.KeyardResource()
     self.resource.api = mock.MagicMock()
     self.api.add_route('/keyard', self.resource)
     prepare_app(self.api)