diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 995fc35a..b91541fb 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -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** diff --git a/httprunner/__init__.py b/httprunner/__init__.py index 748f3812..97bfb536 100644 --- a/httprunner/__init__.py +++ b/httprunner/__init__.py @@ -1,4 +1,4 @@ -__version__ = "2.5.4" +__version__ = "2.5.5" __description__ = "One-stop solution for HTTP(S) testing." __all__ = ["__version__", "__description__"] diff --git a/httprunner/loader/schemas/common.schema.json b/httprunner/loader/schemas/common.schema.json index 67a33961..8986240c 100644 --- a/httprunner/loader/schemas/common.schema.json +++ b/httprunner/loader/schemas/common.schema.json @@ -136,7 +136,9 @@ "HEAD", "PUT", "PATCH", - "DELETE" + "DELETE", + "CONNECT", + "TRACE" ] }, "url": { diff --git a/httprunner/runner.py b/httprunner/runner.py index 7f24f1b5..aa163f52 100644 --- a/httprunner/runner.py +++ b/httprunner/runner.py @@ -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)) diff --git a/pyproject.toml b/pyproject.toml index 2b8d9212..bdcec61b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"