예제 #1
0
    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()
예제 #2
0
 def setUpClass(cls):
     cls.driver = base_test.create_driver()
     cls.webserver = server.WebTestHttpd(routes=[(any_method, "*",
                                                  basic_auth_handler)])
     cls.webserver.start()
예제 #3
0
 def setUpClass(cls):
     cls.driver = base_test.create_driver()
     cls.webserver = server.WebTestHttpd(routes=[(any_method, "*", basic_auth_handler)])
     cls.webserver.start()