test_api.py 文件源码

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

项目:helper_scripts 作者: pythonanywhere 项目源码 文件源码
def test_ignores_404_from_delete_call_when_nuking(self, api_responses, api_token):
        post_url = API_ENDPOINT.format(username=getpass.getuser())
        webapp_url = API_ENDPOINT.format(username=getpass.getuser()) + 'mydomain.com/'
        api_responses.add(responses.DELETE, webapp_url, status=404)
        api_responses.add(responses.POST, post_url, status=201, body=json.dumps({'status': 'OK'}))
        api_responses.add(responses.PATCH, webapp_url, status=200)

        Webapp('mydomain.com').create('2.7', '/virtualenv/path', '/project/path', nuke=True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号