diff options
author | Marc Abramowitz <marc@marc-abramowitz.com> | 2015-04-30 16:42:17 -0700 |
---|---|---|
committer | Marc Abramowitz <marc@marc-abramowitz.com> | 2015-04-30 16:42:17 -0700 |
commit | 12a3f1f4cfa7f88478dc1b0e949fcc095b9fc804 (patch) | |
tree | ddb8079523d846f0b074437fc33fa5e28b508183 /tests/test_response.py | |
download | paste-git-eliminate_cgi_parse_qsl.tar.gz |
Replace cgi.parse_qsl w/ six.moves.urllib.parse.parse_sqleliminate_cgi_parse_qsl_2eliminate_cgi_parse_qsl
because `cgi.parse_qsl` is deprecated, according to
https://docs.python.org/2/library/cgi.html#cgi.parse_qsl
Diffstat (limited to 'tests/test_response.py')
-rw-r--r-- | tests/test_response.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_response.py b/tests/test_response.py new file mode 100644 index 0000000..71f6f97 --- /dev/null +++ b/tests/test_response.py @@ -0,0 +1,11 @@ +from paste.response import * + +def test_replace_header(): + h = [('content-type', 'text/plain'), + ('x-blah', 'foobar')] + replace_header(h, 'content-length', '10') + assert h[-1] == ('content-length', '10') + replace_header(h, 'Content-Type', 'text/html') + assert ('content-type', 'text/html') in h + assert ('content-type', 'text/plain') not in h + |