Fixed formatting error in python2.6

This commit is contained in:
Braulio Valdivielso Martínez
2016-03-03 22:00:27 +01:00
parent 75a9a981b5
commit 567b31080e
+4 -4
View File
@@ -164,7 +164,7 @@ class TestContentEncodingDetection:
data = (i for i in [b'a', b'b', b'c'])
with server as (host, port):
url = 'http://{}:{}/'.format(host, port)
url = 'http://{0}:{1}/'.format(host, port)
r = requests.post(url, data=data, stream=True)
block_server.set() # release server block
@@ -288,7 +288,7 @@ class TestTestServer:
)
with server as (host, port):
r = requests.get('http://{}:{}'.format(host, port))
r = requests.get('http://{0}:{1}'.format(host, port))
assert r.status_code == 200
assert r.text == 'roflol'
@@ -296,7 +296,7 @@ class TestTestServer:
def test_basic_response(self):
with Server.basic_response_server() as (host, port):
r = requests.get('http://{}:{}'.format(host, port))
r = requests.get('http://{0}:{1}'.format(host, port))
assert r.status_code == 200
assert r.text == ''
assert r.headers['Content-Length'] == '0'
@@ -318,7 +318,7 @@ class TestTestServer:
server = Server.basic_response_server(requests_to_handle=requests_to_handle)
with server as (host, port):
server_url = 'http://{}:{}'.format(host, port)
server_url = 'http://{0}:{1}'.format(host, port)
for _ in range(requests_to_handle):
r = requests.get(server_url)
assert r.status_code == 200