Merge pull request #850 from httprunner/leo_dev

2.5.4

**Fixed**

- fix: HTTP method missed "CONNECT", "TRACE"

**Changed**

- change: remove method validation from runner.Runner
This commit is contained in:
debugtalk
2020-02-05 00:28:53 +08:00
committed by GitHub
5 changed files with 15 additions and 11 deletions

View File

@@ -1,5 +1,15 @@
# Release History
## 2.5.5 (2020-01-06)
**Fixed**
- fix: HTTP method missed "CONNECT", "TRACE"
**Changed**
- change: remove method validation from runner.Runner
## 2.5.4 (2020-01-03)
**Added**

View File

@@ -1,4 +1,4 @@
__version__ = "2.5.4"
__version__ = "2.5.5"
__description__ = "One-stop solution for HTTP(S) testing."
__all__ = ["__version__", "__description__"]

View File

@@ -136,7 +136,9 @@
"HEAD",
"PUT",
"PATCH",
"DELETE"
"DELETE",
"CONNECT",
"TRACE"
]
},
"url": {

View File

@@ -230,14 +230,6 @@ class Runner(object):
except KeyError:
raise exceptions.ParamsError("URL or METHOD missed!")
# TODO: move method validation to json schema
valid_methods = ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"]
if method.upper() not in valid_methods:
err_msg = u"Invalid HTTP method! => {}\n".format(method)
err_msg += "Available HTTP methods: {}".format("/".join(valid_methods))
logger.log_error(err_msg)
raise exceptions.ParamsError(err_msg)
logger.log_info("{method} {url}".format(method=method, url=parsed_url))
logger.log_debug(
"request kwargs(raw): {kwargs}".format(kwargs=parsed_test_request))

View File

@@ -1,6 +1,6 @@
[tool.poetry]
name = "httprunner"
version = "2.5.4"
version = "2.5.5"
description = "One-stop solution for HTTP(S) testing."
license = "Apache-2.0"
readme = "README.md"