def test_invalid_page(self):
"PaginatedListView should raise 404 if we ask for a page number that doesn't exist."
# Use a URL with p=99:
request = self.factory.get('/fake-path/?p=99')
with self.assertRaises(Http404):
response = views.PublicationListView.as_view()(request)
评论列表
文章目录