deprecate function_binds

This commit is contained in:
httprunner
2018-07-26 15:23:03 +08:00
parent adb72e7d75
commit 29073d7111
6 changed files with 15 additions and 38 deletions

View File

@@ -1,7 +1,7 @@
__title__ = 'HttpRunner'
__description__ = 'One-stop solution for HTTP(S) testing.'
__url__ = 'https://github.com/HttpRunner/HttpRunner'
__version__ = '1.5.7'
__version__ = '1.5.8'
__author__ = 'debugtalk'
__author_email__ = 'mail@debugtalk.com'
__license__ = 'MIT'

View File

@@ -45,9 +45,6 @@ class Context(object):
if level == "testset":
self.testcase_parser.file_path = config_dict.get("path", None)
function_binds = config_dict.get('function_binds', {})
self.bind_functions(function_binds, level)
variables = config_dict.get('variables') \
or config_dict.get('variable_binds', OrderedDict())
self.bind_variables(variables, level)

View File

@@ -36,7 +36,6 @@ class Runner(object):
{
"name": "smoke testset",
"path": "tests/data/demo_testset_variables.yml",
"function_binds": {}, # optional
"variables": [], # optional
"request": {
"base_url": "http://127.0.0.1:5000",
@@ -48,7 +47,6 @@ class Runner(object):
testcase:
{
"name": "testcase description",
"function_binds": {}, # optional
"variables": [], # optional
"request": {
"url": "/api/get-token",
@@ -113,7 +111,6 @@ class Runner(object):
"name": "testcase description",
"skip": "skip this test unconditionally",
"times": 3,
"function_binds": {}, # optional, override
"variables": [], # optional, override
"request": {
"url": "http://127.0.0.1:5000/api/users/1000",

View File

@@ -43,7 +43,6 @@ class TestSuite(unittest.TestSuite):
"name": "testset description",
"config": {
"name": "testset description",
"function_binds": {},
"parameters": {},
"variables": [],
"request": {},