views_test.py 文件源码

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

项目:annotran 作者: BirkbeckCTP 项目源码 文件源码
def test_add_report_to_db_pg_auth_rep_group_lang_none():
    """
        This should raise HTTPNotFound as all page, author, reporter, group, and language is None.
    """
    request = _mock_request(authenticated_user=mock.Mock(username="test"),
                            matchdict={'public_language_id': '12345',
                                       'public_group_id': '12345',
                                       'user_id': '12345',
                                       'page_uri': 'http://www.annotran_test.com/'})
    with pytest.raises(exc.HTTPNotFound):
        views.add_report(request)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号