mocked_cbastion.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:cbas 作者: ImmobilienScout24 项目源码 文件源码
def create():
    auth_token = request.headers.get('Authorization').split()[1]
    if auth_token == 'my-nifty-access-token':
        return {'response': 'Successful creation of user.'}
    elif auth_token == 'the-token-with-which-create-will-fail':
        response.status = 403
        return {'error': 'Permission denied'}
    elif auth_token == 'the-token-which-causes-an-empty-page':
        response.status = 403
        return "empty"
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号