mirror of
https://github.com/httpie/cli.git
synced 2025-08-14 08:28:50 +02:00
Add more plugin API tests
This commit is contained in:
@ -62,3 +62,14 @@ def test_only_username_in_url(url):
|
||||
assert args.auth
|
||||
assert args.auth.username == 'username'
|
||||
assert args.auth.password == ''
|
||||
|
||||
|
||||
def test_missing_auth(httpbin):
|
||||
r = http(
|
||||
'--auth-type=basic',
|
||||
'GET',
|
||||
httpbin + '/basic-auth/user/password',
|
||||
error_exit_ok=True
|
||||
)
|
||||
assert HTTP_OK not in r
|
||||
assert '--auth required' in r.stderr
|
||||
|
Reference in New Issue
Block a user