tests.py 文件源码

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

项目:python-deform 作者: deformio 项目源码 文件源码
def test_confirm_already_confirmed_code(self):
        with responses.RequestsMock() as rsps:
            rsps.add(
                self.deform_client.user.confirm.method.upper(),
                self.deform_client.user.confirm.get_context({})['url'],
                json={
                    'message': 'User already exists.'
                },
                status=409
            )
            assert_that(
                calling(self.deform_client.user.confirm).with_args(
                    code='12345'
                ),
                raises(ConflictError, '^User already exists\.$')
            )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号