

def test_credentials_in_url_auth_flag_has_priority(httpbin_both):
    'When credentials are passed in URL and via -a at the same time,\n     then the ones from -a are used.'
    url = add_auth((url.url + '/basic-auth/user/password'), auth='user:wrong')
    r = http('--auth=user:password', 'GET', url)
    assert (HTTP_OK in r)
    assert (r.json == {
        'authenticated': True,
        'user': 'user',
    })

dataset/ETHPy150Open jkbrzt/httpie/tests/test_auth.py test_credentials_in_url_auth_flag_has_priority/VarMisuse@17/75 `httpbin_both`->`url`