test_views.py 文件源码

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

项目:gthnk 作者: iandennismiller 项目源码 文件源码
def test_bypass_login(self):
        create_user()
        with self.app.test_client() as c:
            with c.session_transaction() as sess:
                sess['user_id'] = '1'
                sess['_fresh'] = True
            rv = c.get('/', follow_redirects=True)
            six.assertRegex(self, str(rv.data), r'logout', "response contains text 'logout'")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号