示例#1
0
 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 = {}
示例#2
0
文件: __init__.py 项目: jc7998/deuce
 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 = {}
示例#3
0
文件: driver.py 项目: sujala/deuce
    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)
示例#4
0
文件: driver.py 项目: jc7998/deuce
    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)