aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/flow_export.py1
-rw-r--r--test/mitmproxy/test_flow_export.py12
2 files changed, 7 insertions, 6 deletions
diff --git a/mitmproxy/flow_export.py b/mitmproxy/flow_export.py
index e2d46d93..e2ba7161 100644
--- a/mitmproxy/flow_export.py
+++ b/mitmproxy/flow_export.py
@@ -161,6 +161,7 @@ def locust_code(flow):
code = code.replace(host, "' + self.locust.host + '")
code = code.replace(quote_plus(host), "' + quote_plus(self.locust.host) + '")
code = code.replace(quote(host), "' + quote(self.locust.host) + '")
+ code = code.replace("'' + ", "")
return code
diff --git a/test/mitmproxy/test_flow_export.py b/test/mitmproxy/test_flow_export.py
index d937135f..ae553685 100644
--- a/test/mitmproxy/test_flow_export.py
+++ b/test/mitmproxy/test_flow_export.py
@@ -192,7 +192,7 @@ class UserBehavior(TaskSet):
@task()
def path(self):
- url = '' + self.locust.host + '/path'
+ url = self.locust.host + '/path'
headers = {
'header': 'qvalue',
@@ -230,7 +230,7 @@ class UserBehavior(TaskSet):
@task()
def path(self):
- url = '' + self.locust.host + '/path'
+ url = self.locust.host + '/path'
data = '''content'''
@@ -265,7 +265,7 @@ class UserBehavior(TaskSet):
@task()
def path(self):
- url = '' + self.locust.host + '/path'
+ url = self.locust.host + '/path'
headers = {
'header': 'qvalue',
@@ -306,7 +306,7 @@ class TestExportLocustTask():
result = ' ' + """
@task()
def path(self):
- url = '' + self.locust.host + '/path'
+ url = self.locust.host + '/path'
headers = {
'header': 'qvalue',
@@ -327,7 +327,7 @@ class TestExportLocustTask():
result = ' ' + """
@task()
def path(self):
- url = '' + self.locust.host + '/path'
+ url = self.locust.host + '/path'
data = '''content'''
@@ -346,7 +346,7 @@ class TestExportLocustTask():
result = ' ' + """
@task()
def path(self):
- url = '' + self.locust.host + '/path'
+ url = self.locust.host + '/path'
headers = {
'header': 'qvalue',