def test_add_vote_to_db_authenticated_user_objects_none():
"""
This should raise HTTPNotFound as all page, author, voter, group, and language are None.
"""
request = _mock_request(matchdict={'page_uri': 'http://www.annotran_test.com',
'public_group_id': "12345",
'public_language_id': "12345",
'score': 5,
'username':"test_username"},
authenticated_user=mock.Mock(id=2, username="test2", uid="test2"))
with pytest.raises(httpexceptions.HTTPNotFound):
views.add_vote(request)
评论列表
文章目录