httpie-cli/tests/test_regressions.py
2014-06-28 19:52:10 +02:00

17 lines
404 B
Python

"""Miscellaneous regression tests"""
from utils import http, HTTP_OK
def test_Host_header_overwrite(httpbin):
"""
https://github.com/jakubroztocil/httpie/issues/235
"""
host = 'httpbin.org'
url = httpbin.url + '/get'
r = http('--print=hH', url, 'host:{0}'.format(host))
assert HTTP_OK in r
assert r.lower().count('host:') == 1
assert 'host: {0}'.format(host) in r