add remove_prefix utils

This commit is contained in:
httprunner
2017-11-02 18:42:26 +08:00
parent cc6fa938a0
commit e08e3d5299
2 changed files with 15 additions and 0 deletions

View File

@@ -39,6 +39,13 @@ def get_sign(*args):
sign = hmac.new(sign_key, content, hashlib.sha1).hexdigest()
return sign
def remove_prefix(text, prefix):
""" remove prefix from text
"""
if text.startswith(prefix):
return text[len(prefix):]
return text
def load_folder_files(folder_path, recursive=True):
""" load folder path, return all files in list format.
@param