aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZohar Lorberbaum <Zohar.Lorberbaum@qumu.com>2016-03-28 09:51:06 -0700
committerZohar Lorberbaum <Zohar.Lorberbaum@qumu.com>2016-03-28 09:51:06 -0700
commite56198ae7cf5de1d00c799133d3257434072998e (patch)
tree694c0565ec4ac3b67e56ea4f9fca7d68938aafe9
parentef3d24e8c84dac705a4d1f0bacdc64fec7bffe22 (diff)
downloadmitmproxy-e56198ae7cf5de1d00c799133d3257434072998e.tar.gz
mitmproxy-e56198ae7cf5de1d00c799133d3257434072998e.tar.bz2
mitmproxy-e56198ae7cf5de1d00c799133d3257434072998e.zip
cleaner target url
-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',