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))
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))
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))
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))