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
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)