def test_anonymous_user_read_blogposts_for_given_draft_project(self):
"""Test anonymous users cannot read blogposts of a given project if is a draft"""
project = ProjectFactory.create(published=False)
assert_raises(Unauthorized, ensure_authorized_to, 'read', Blogpost, project_id=project.id)
test_blogpost_auth.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录