Esempio n. 1
0
 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))
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)