def _test_wrap(self, factory, wrapper): app = make_app(self.global_config, serve_dirs=self._get_repo_parents()) wrapped_app = factory(self.global_config)(app) self.assertTrue(isinstance(wrapped_app, wrapper))
def test_repo(self): rname = self.repo_names[0] local_config = {rname: self.repo_dirs[0]} app = make_app(self.global_config, **local_config) self.assertIn("/%s" % rname, app.backend.repos)
def test_serve_dirs(self): app = make_app(self.global_config, serve_dirs=self._get_repo_parents()) for rname in self.repo_names: self.assertIn("/%s" % rname, app.backend.repos)
def test_cwd(self): cwd = os.getcwd() os.chdir(self.repo_dirs[0]) app = make_app(self.global_config) os.chdir(cwd) self.assertIn("/", app.backend.repos)