def test_response_404(self):
"It should raise 404 if there's no Publication with that slug."
with self.assertRaises(Http404):
response = views.PublicationDetailView.as_view()(self.request, slug='nope')
文章目录