refactor mock server:

1, remove authentication switcher;
2, change authentication method: from verify request data's md5 to get token at the beginning.
This commit is contained in:
httprunner
2017-07-22 15:14:52 +08:00
parent 5e59951e73
commit 16307e2ebe
25 changed files with 587 additions and 759 deletions

View File

@@ -1,5 +1,6 @@
import re
from ate.exception import ParamsError
from ate.utils import string_type
def parse_content_with_variables(content, variables_binds):
@@ -58,7 +59,7 @@ def parse_template(testcase_template, variables_binds):
def substitute(content):
""" substitute content recursively, each variable will be replaced with bind value.
"""
if isinstance(content, str):
if isinstance(content, string_type):
return parse_content_with_variables(content, variables_binds)
if isinstance(content, list):