#!/bin/python3 import webtest import controller import gestalt index = gestalt.LoadConfig().index app = webtest.TestApp(controller.app) status = gestalt.checkresponse(index) def test_index(): assert app.get(index).status_int == 200 def test_get_favicon(): assert app.get(index + '/favicon.ico').status_int == 200 def test_get_css(): assert app.get(index + '/mini.css').status_int == 200 def test_dump(): assert app.get(index + '/dump').status_int == 200 assert app.get(index + '/api/dump').status_int == 200 def test_endpoints():
def test_checkresponse(): if gestalt.checkresponse(settings.index) == 200: assert gestalt.checkresponse(settings.index) == 200 assert gestalt.checkresponse(settings.index + '/404') == 404 assert gestalt.checkresponse('failURL') == 1