Fix assertRaises call
This commit is contained in:
parent
1b36a5aace
commit
5f73ab254a
1 changed files with 3 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue