def setUpClass(cls): cls.driver = base_test.create_driver() def basic_response_func(request, *args): return (401, {"WWW-Authenticate": "Basic"}, None) basic_auth_handler = {'method': 'GET', 'path': '/navigation/auth_required_basic', 'function': basic_response_func} urlhandlers = [basic_auth_handler] cls.webserver = Httpd(urlhandlers=urlhandlers) cls.webserver.start()
def setUpClass(cls): cls.driver = base_test.create_driver() cls.webserver = server.WebTestHttpd(routes=[(any_method, "*", basic_auth_handler)]) cls.webserver.start()