mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +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):
|
if isinstance(request["data"], str):
|
||||||
request["data"] = request["data"].encode('utf-8')
|
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):
|
def sleep_N_secs(n_secs):
|
||||||
""" sleep n seconds
|
""" sleep n seconds
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -87,3 +87,10 @@ def hook_print(msg):
|
|||||||
|
|
||||||
def modify_headers_os_platform(request, os_platform):
|
def modify_headers_os_platform(request, os_platform):
|
||||||
request["headers"]["os_platform"] = 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