def test_authenticate_with_invalid_password(self):
"""
Verify authenticate denies with a proper JSON file, Authorization header, and the wrong password.
"""
self.http_basic_auth= httpbasicauth.HTTPBasicAuth(self.user_config)
req = falcon.Request(
create_environ(headers={'Authorization': 'basic YTpiCg=='}))
resp = falcon.Response()
self.assertRaises(
falcon.HTTPForbidden,
self.http_basic_auth.authenticate,
req, resp)
test_authenticator_httpbasicauth.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录