add setup_hook_prepare_kwargs as default setup hook

This commit is contained in:
debugtalk
2018-03-21 20:12:58 +08:00
parent 8b7bbb4171
commit 6d05ac32dc
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
__title__ = 'HttpRunner' __title__ = 'HttpRunner'
__description__ = 'One-stop solution for HTTP(S) testing.' __description__ = 'One-stop solution for HTTP(S) testing.'
__url__ = 'https://github.com/HttpRunner/HttpRunner' __url__ = 'https://github.com/HttpRunner/HttpRunner'
__version__ = '1.2.1-beta' __version__ = '1.2.2-beta'
__author__ = 'debugtalk' __author__ = 'debugtalk'
__author_email__ = 'mail@debugtalk.com' __author_email__ = 'mail@debugtalk.com'
__license__ = 'MIT' __license__ = 'MIT'
+1 -1
View File
@@ -26,7 +26,7 @@ def setup_logger(log_level):
sys.tracebacklimit = 0 sys.tracebacklimit = 0
formatter = ColoredFormatter( formatter = ColoredFormatter(
"%(log_color)s%(bg_white)s%(levelname)-8s%(reset)s %(message)s", u"%(log_color)s%(bg_white)s%(levelname)-8s%(reset)s %(message)s",
datefmt=None, datefmt=None,
reset=True, reset=True,
log_colors=log_colors_config log_colors=log_colors_config
+1
View File
@@ -113,6 +113,7 @@ class Runner(object):
* *url*: URL that was called (or override name if it was used in the call to the client) * *url*: URL that was called (or override name if it was used in the call to the client)
* *kwargs*: kwargs of request * *kwargs*: kwargs of request
""" """
hooks.insert(0, "setup_hook_prepare_kwargs")
event = self._prepare_hooks_event(hooks) event = self._prepare_hooks_event(hooks)
if not event: if not event:
return return