diff --git a/tests/test_views.py b/tests/test_views.py index c1ba03a..785d7ed 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -492,5 +492,6 @@ class ViewTest(BaseTest): view_obj = CategoryEntriesView() view_obj.request = request view_obj.namespace, view_obj.config = get_app_instance(request) - view_obj.kwargs = {'category': 'unknown-category'} - self.assertRaises(Http404, view_obj.get_queryset, ()) + with self.assertRaises(Http404): + view_obj.kwargs = {'category': 'unknown-category'} + category_obj = view_obj.get_object()