mirror of
https://github.com/httpie/cli.git
synced 2025-01-13 09:08:44 +01:00
Fixed --timeout
* Require requests >= 2.3.0 * Updated test_timeout_exit_status Close #185.
This commit is contained in:
parent
4449da456a
commit
77955c9837
2
setup.py
2
setup.py
@ -29,7 +29,7 @@ tests_require = [
|
||||
|
||||
|
||||
install_requires = [
|
||||
'requests>=2.0.0',
|
||||
'requests>=2.3.0',
|
||||
'Pygments>=1.5'
|
||||
]
|
||||
try:
|
||||
|
@ -18,13 +18,13 @@ class TestExitStatus:
|
||||
assert not r.stderr
|
||||
|
||||
@pytest.mark.skipif(
|
||||
True,
|
||||
reason='timeout broken in requests'
|
||||
' (https://github.com/jakubroztocil/httpie/issues/185)')
|
||||
tuple(map(int, requests.__version__.split('.'))) < (2, 3, 0),
|
||||
reason='timeout broken in requests prior v2.3.0 (#185)'
|
||||
)
|
||||
def test_timeout_exit_status(self):
|
||||
|
||||
r = http('--timeout=0.5', 'GET', httpbin('/delay/1'),
|
||||
error_exit_ok=True)
|
||||
assert HTTP_OK in r
|
||||
assert r.exit_status == ExitStatus.ERROR_TIMEOUT
|
||||
|
||||
def test_3xx_check_status_exits_3_and_stderr_when_stdout_redirected(self):
|
||||
|
Loading…
Reference in New Issue
Block a user