# HG changeset patch # User Pierre-Yves David # Date 2015-05-18 21:52:28 # Node ID 5a6820f8da4dcf0b024b0d641ae58d988ee0bdc6 # Parent 6358391453f3c72af2887968da71e1c5f3165dfc tests: just use 'response.reason' There is no reason to not have simple code now that Python 2.4 is dead. diff --git a/tests/get-with-headers.py b/tests/get-with-headers.py --- a/tests/get-with-headers.py +++ b/tests/get-with-headers.py @@ -33,8 +33,6 @@ if '--json' in sys.argv: sys.argv.remove('--json') formatjson = True -reasons = {'Not modified': 'Not Modified'} # python 2.4 - tag = None def request(host, path, show): assert not path.startswith('/'), path @@ -46,7 +44,7 @@ def request(host, path, show): conn = httplib.HTTPConnection(host) conn.request("GET", '/' + path, None, headers) response = conn.getresponse() - print response.status, reasons.get(response.reason, response.reason) + print response.status, response.reason if show[:1] == ['-']: show = sorted(h for h, v in response.getheaders() if h.lower() not in show)