mirror of
https://github.com/httpie/cli.git
synced 2025-01-13 17:18:32 +01:00
17 lines
404 B
Python
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
|