def app_setup(self, hooks): endpoints = [ ('/v1.0', v1_0.public_endpoints()), ] self.app = falcon.API(before=hooks) for version_path, endpoints in endpoints: for route, resource in endpoints: self.app.add_route(version_path + route, resource) self.srmock = ftest.StartResponseMock() self.headers = {}
def _init_routes(self): """Initialize hooks and URI routes to resources.""" endpoints = [ ('/v1.0', v1_0.public_endpoints()), ] self.app = falcon.API(before=self.before_hooks()) for version_path, endpoints in endpoints: for route, resource in endpoints: self.app.add_route(version_path + route, resource)
def _init_routes(self): """Initialize hooks and URI routes to resources.""" endpoints = [ ('/v1.0', v1_0.public_endpoints()), ] self.app = falcon.API(before=self.before_hooks) for version_path, endpoints in endpoints: for route, resource in endpoints: self.app.add_route(version_path + route, resource)