Exemplo n.º 1
0
 def test_graph_page_loads(self):
     try:
         tester = app.test_client(self)
         response = tester.get('/graph/')
         self.assertTrue(response.status_code, 302)
     except Exception as e:
         logger.error("Tried to test graph page: Exception:{0}".format(e))
Exemplo n.º 2
0
 def test_login_page_load(self):
     try:
         tester = app.test_client(self)
         response = tester.get('/', content_type='html/text')
         self.assertTrue(response.status_code, 200)
     except Exception as e:
         logger.error("Tried to test login page Exception:{0}".format(e))
Exemplo n.º 3
0
 def test_register_page_loads(self):
     try:
         tester = app.test_client(self)
         response = tester.get('/register/')
         self.assertTrue(response.status_code, 200)
     except Exception as e:
         logger.error(
             "Tried to test register page: Exception:{0}".format(e))
Exemplo n.º 4
0
 def test_sessions(self):
     try:
         tester = app.test_client(self)
         with tester as c:
             with c.session_transaction() as sess:
                 sess['user'] = "******"
             response = tester.get('/menu/')
         self.assertTrue(response.status_code, 200)
     except Exception as e:
         logger.error("Tried to test sessions: Exception:{0}".format(e))