Generate better function names for root url. (#1100)

This commit is contained in:
Zohar Lorberbaum 2016-04-28 15:09:42 -07:00 committed by Maximilian Hils
parent 66267ad276
commit acaca765e4

View File

@ -128,7 +128,9 @@ def locust_code(flow):
file_name = "_".join(components)
name = re.sub('\W|^(?=\d)', '_', file_name)
url = flow.request.scheme + "://" + flow.request.host + "/" + "/".join(components)
if name == "" or name is None:
new_name = "_".join([str(flow.request.host) , str(flow.request.timestamp_start)])
name = re.sub('\W|^(?=\d)', '_', new_name)
args = ""
headers = ""
if flow.request.headers: