From 567b31080e62fd52bb9b8fb778736eb05359daa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Braulio=20Valdivielso=20Mart=C3=ADnez?= Date: Thu, 3 Mar 2016 22:00:27 +0100 Subject: [PATCH] Fixed formatting error in python2.6 --- tests/test_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 29dd4b85..bc585287 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -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