예제 #1
0
 def request_with(authfunc, auth_header):
     harness.client.website.algorithm.insert_after( 'parse_environ_into_request'
                                                  , inbound_responder(authfunc)
                                                   )
     return harness.simple( filepath=None
                          , return_after='httpbasic_inbound_responder'
                          , want='request'
                          , HTTP_AUTHORIZATION=auth_header
                           )
예제 #2
0
def _request_with(authfunc, auth_header):
    request = StubRequest()
    if auth_header is not None:
        request.headers['Authorization'] = auth_header
    hook = inbound_responder(authfunc)
    return hook(request)
예제 #3
0
def _request_with(authfunc, auth_header):
    request = StubRequest()
    if auth_header is not None:
        request.headers['Authorization'] = auth_header
    hook = inbound_responder(authfunc)
    return hook(request)