Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Jan 18, 2018
1 parent f5b3780 commit 21c0b3d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion tests/test_views.py
Expand Up @@ -494,4 +494,15 @@ def test_non_existing_blog_category_should_raise_404(self):
view_obj.namespace, view_obj.config = get_app_instance(request)
with self.assertRaises(Http404):
view_obj.kwargs = {'category': 'unknown-category'}
category_obj = view_obj.get_queryset()
view_obj.get_queryset()

def test_non_existing_author_should_raise_404(self):
pages = self.get_pages()
with smart_override('en'):
request = self.get_request(pages[1], 'en', AnonymousUser())
view_obj = AuthorEntriesView()
view_obj.request = request
view_obj.namespace, view_obj.config = get_app_instance(request)
with self.assertRaises(Http404):
view_obj.kwargs = {'username': 'unknown-author'}
view_obj.get_context_data()

0 comments on commit 21c0b3d

Please sign in to comment.