test_helpingmaterial.py 文件源码

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

项目:FRG-Crowdsourcing 作者: 97amarnathk 项目源码 文件源码
def test_non_owner_authenticated_user_read_helpingmaterials_for_given_draft_project(self):
        """Test authenticated user cannot read helpingmaterials of a given project if is
        a draft and is not the project owner"""

        project = ProjectFactory.create(published=False)

        assert self.mock_authenticated.id != project.owner.id
        assert_raises(Forbidden, ensure_authorized_to, 'read',
                      HelpingMaterial, project_id=project.id)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号