Esempio n. 1
0
 def preprocess_request(self):
     """Add our auth, checks and setup before request processing"""
     flask.g.config = ConfigDAO.get
     audit.setup_audit()
     auth.require_auth()
     communication.check_request_headers()
     communication.setup_args_handling()
     communication.parse_my_projects_arg()
     return flask.Flask.preprocess_request(self)
Esempio n. 2
0
 def test_no_auth_endpoint(self):
     self.mox.ReplayAll()
     with self.app.test_request_context('/hello'):
         result = auth.require_auth()
         self.assertEquals(result, None)
         self.assertEquals(g.client_set, None)
         self.assertEquals(g.is_admin, False)