def test_non_owner_authenticated_user_read_given_helpingmaterial_draft_project(self):
"""Test authenticated user cannot read a given helpingmaterial of a
draft project if is not the project owner"""
project = ProjectFactory.create(published=False)
helpingmaterial = HelpingMaterialFactory.create(project_id=project.id)
assert self.mock_authenticated.id != project.owner.id
assert_raises(Forbidden, ensure_authorized_to, 'read', helpingmaterial)
test_helpingmaterial.py 文件源码
python
阅读 22
收藏 0
点赞 0
评论 0
评论列表
文章目录