def build_app(root):
    if root.startswith('http'):
        app = TestApp(WSGIProxyApp(root),
                      extra_environ={"REMOTE_ADDR": root})
    else:
        app = TestApp(CatchErrors(resolve_name(root)))
    return app
Exemple #2
0
 def setup(self):
     return resolve_name(self._setup) if self._setup else None
Exemple #3
0
 def teardown(self):
     return resolve_name(self._teardown) if self._teardown else None
Exemple #4
0
 def func(self):
     if self._func is None:
         self._func = resolve_name(self.location)
     return self._func