Add more plugin API tests

This commit is contained in:
Jakub Roztocil
2016-11-23 23:09:45 +01:00
parent 47fd392c74
commit 3f7ed35238
4 changed files with 78 additions and 22 deletions

View File

@ -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