Added test for -F shortcut

This commit is contained in:
Jakub Roztocil 2016-03-09 21:58:34 +08:00
parent 76e15b227c
commit 35a99fe04b

View File

@ -1,4 +1,6 @@
"""High-level tests."""
import pytest
from httpie import ExitStatus
from utils import http, HTTP_OK
@ -10,8 +12,9 @@ def test_follow_all_redirects_shown(httpbin):
assert HTTP_OK in r
def test_follow_without_all_redirects_hidden(httpbin):
r = http('--follow', httpbin.url + '/redirect/2')
@pytest.mark.parametrize('follow_flag', ['--follow', '-F'])
def test_follow_without_all_redirects_hidden(httpbin, follow_flag):
r = http(follow_flag, httpbin.url + '/redirect/2')
assert r.count('HTTP/1.1') == 1
assert HTTP_OK in r