mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-14 20:08:23 +08:00
remove setup_hook_httpntlmauth from built-in hooks
This commit is contained in:
@@ -143,13 +143,6 @@ def setup_hook_prepare_kwargs(request):
|
||||
if isinstance(request["data"], str):
|
||||
request["data"] = request["data"].encode('utf-8')
|
||||
|
||||
def setup_hook_httpntlmauth(request):
|
||||
if "httpntlmauth" in request:
|
||||
from requests_ntlm import HttpNtlmAuth
|
||||
auth_account = request.pop("httpntlmauth")
|
||||
request["auth"] = HttpNtlmAuth(
|
||||
auth_account["username"], auth_account["password"])
|
||||
|
||||
def sleep_N_secs(n_secs):
|
||||
""" sleep n seconds
|
||||
"""
|
||||
|
||||
@@ -87,3 +87,10 @@ def hook_print(msg):
|
||||
|
||||
def modify_headers_os_platform(request, os_platform):
|
||||
request["headers"]["os_platform"] = os_platform
|
||||
|
||||
def setup_hook_httpntlmauth(request):
|
||||
if "httpntlmauth" in request:
|
||||
from requests_ntlm import HttpNtlmAuth
|
||||
auth_account = request.pop("httpntlmauth")
|
||||
request["auth"] = HttpNtlmAuth(
|
||||
auth_account["username"], auth_account["password"])
|
||||
|
||||
Reference in New Issue
Block a user