Skip to content

Commit

Permalink
feat(forum/test_views.py): expression plus courte sur test_template_name
Browse files Browse the repository at this point in the history
  • Loading branch information
calummackervoy committed Jun 18, 2024
1 parent efe3505 commit 20311ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lacommunaute/forum/tests/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ def get_url_for_forum(forum):
response = self.client.get(self.url, **{"HTTP_HX_REQUEST": "true"})
self.assertTemplateUsed(response, "forum_conversation/topic_list.html")

documentation_category_forum = ForumFactory(type=Forum.FORUM_CAT, with_public_perms=True)
documentation_forum = ForumFactory(parent=documentation_category_forum, with_public_perms=True)
documentation_category_forum = CategoryForumFactory(
type=Forum.FORUM_CAT, with_public_perms=True, with_child=True
)
documentation_forum = documentation_category_forum.children.first()

response = self.client.get(get_url_for_forum(documentation_category_forum))
self.assertTemplateUsed(response, "forum/forum_documentation_category.html")
Expand Down

0 comments on commit 20311ba

Please sign in to comment.