def test_invalid_page(self):
request = testing.DummyRequest()
request.params['page'] = 'invalid'
request.current_route_url = mock.Mock(side_effect=self.get_current_url)
with pytest.raises(HTTPNotFound):
self.paginate_queryset(request)
test_pagination.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录