tests.py 文件源码

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

项目:python-deform 作者: deformio 项目源码 文件源码
def test_create_new_user(self):
        with responses.RequestsMock() as rsps:
            rsps.add(
                self.deform_client.user.create.method.upper(),
                self.deform_client.user.create.get_context({})['url'],
                json={
                    'message': 'Check your email for confirmation code'
                },
                status=201
            )
            response = self.deform_client.user.create(
                email='a' + self.CONFIG['DEFORM']['EMAIL'],
                password=self.CONFIG['DEFORM']['PASSWORD']
            )
            assert_that(
                response,
                has_entry('message', 'Check your email for confirmation code')
            )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号