You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-06-15 00:15:06 +02:00
add -A
as short arg for --auth-type
Addresses #430 comes with unit test
This commit is contained in:
@ -14,11 +14,12 @@ class TestAuth:
|
||||
assert HTTP_OK in r
|
||||
assert r.json == {'authenticated': True, 'user': 'user'}
|
||||
|
||||
@pytest.mark.parametrize('argument_name', ['--auth-type', '-A'])
|
||||
@pytest.mark.skipif(
|
||||
requests.__version__ == '0.13.6',
|
||||
reason='Redirects with prefetch=False are broken in Requests 0.13.6')
|
||||
def test_digest_auth(self, httpbin):
|
||||
r = http('--auth-type=digest', '--auth=user:password',
|
||||
def test_digest_auth(self, httpbin, argument_name):
|
||||
r = http('{}=digest'.format(argument_name), '--auth=user:password',
|
||||
'GET', httpbin.url + '/digest-auth/auth/user/password')
|
||||
assert HTTP_OK in r
|
||||
assert r.json == {'authenticated': True, 'user': 'user'}
|
||||
|
Reference in New Issue
Block a user