diff --git a/lacommunaute/forum/tests/tests_views.py b/lacommunaute/forum/tests/tests_views.py index 3649d4883..aecded4c5 100644 --- a/lacommunaute/forum/tests/tests_views.py +++ b/lacommunaute/forum/tests/tests_views.py @@ -128,27 +128,27 @@ def test_has_liked(self): self.client.force_login(self.user) response = self.client.get(self.url) # icon: solid heart - self.assertContains(response, '1') + self.assertContains(response, '1') def test_has_not_liked(self): self.client.force_login(self.user) response = self.client.get(self.url) # icon: regular heart (outlined) - self.assertContains(response, '0') + self.assertContains(response, '0') def test_has_liked_TOPIC_ANNOUNCE(self): TopicFactory(forum=self.forum, poster=self.user, with_post=True, with_like=True, type=Topic.TOPIC_ANNOUNCE) self.client.force_login(self.user) response = self.client.get(self.url) - self.assertContains(response, '1') + self.assertContains(response, '1') def test_has_not_liked_TOPIC_ANNOUNCE(self): TopicFactory(forum=self.forum, poster=self.user, with_post=True, type=Topic.TOPIC_ANNOUNCE) self.client.force_login(self.user) response = self.client.get(self.url) - self.assertContains(response, '0') + self.assertContains(response, '0') def test_anonymous_like(self): params = {"next_url": self.url} @@ -342,7 +342,7 @@ def test_share_buttons(self): response = self.client.get(url) self.assertContains( response, - 'div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuSocialShare">', + 'div class="dropdown-menu dropdown-menu-end" aria-labelledby="dropdownMenuSocialShare">', status_code=200, ) @@ -357,7 +357,7 @@ def test_upvote_actions(self): ' rel="nofollow"' ' class="btn btn-sm btn-ico-only btn-link btn-secondary" data-toggle="tooltip" data-placement="top"' ' title="Connectez-vous pour sauvegarder">' - '\n 0' + '\n 0' ) response = self.client.get( reverse("forum_extension:forum", kwargs={"pk": child_forum.pk, "slug": child_forum.slug}) @@ -374,7 +374,7 @@ def test_upvote_actions(self): '\n data-matomo-action="upvote"' '\n data-matomo-option="post"' "\n >" - '\n ' + '\n ' "0" ) response = self.client.get(reverse("forum_extension:forum", kwargs={"pk": child_forum.pk, "slug": forum.slug})) @@ -389,7 +389,7 @@ def test_upvote_actions(self): '\n data-matomo-action="upvote"' '\n data-matomo-option="post"' "\n >" - '\n ' + '\n ' "1" ) response = self.client.get( @@ -405,7 +405,7 @@ def test_upvotes_count(self): reverse("forum_extension:forum", kwargs={"pk": child_forum.pk, "slug": child_forum.slug}) ) self.assertContains( - response, '0', status_code=200 + response, '0', status_code=200 ) child_forum.upvotes.create(voter=self.user) @@ -414,7 +414,7 @@ def test_upvotes_count(self): reverse("forum_extension:forum", kwargs={"pk": child_forum.pk, "slug": child_forum.slug}) ) self.assertContains( - response, '1', status_code=200 + response, '1', status_code=200 ) child_forum.upvotes.create(voter=UserFactory()) @@ -423,5 +423,5 @@ def test_upvotes_count(self): reverse("forum_extension:forum", kwargs={"pk": child_forum.pk, "slug": child_forum.slug}) ) self.assertContains( - response, '2', status_code=200 + response, '2', status_code=200 ) diff --git a/lacommunaute/forum_conversation/tests/tests_views.py b/lacommunaute/forum_conversation/tests/tests_views.py index 9297b3fb2..18ea4e9e7 100644 --- a/lacommunaute/forum_conversation/tests/tests_views.py +++ b/lacommunaute/forum_conversation/tests/tests_views.py @@ -389,13 +389,13 @@ def test_has_liked(self): self.client.force_login(self.poster) response = self.client.get(self.url) # icon: solid heart - self.assertContains(response, '1') + self.assertContains(response, '1') def test_has_not_liked(self): self.client.force_login(self.poster) response = self.client.get(self.url) # icon: regular heart (outlined) - self.assertContains(response, '0') + self.assertContains(response, '0') def test_pluralized_likes(self): self.topic.likers.add(UserFactory()) @@ -405,7 +405,7 @@ def test_pluralized_likes(self): self.client.force_login(self.poster) response = self.client.get(self.url) # icon: regular heart (outlined) - self.assertContains(response, '2') + self.assertContains(response, '2') def test_anonymous_like(self): assign_perm("can_read_forum", AnonymousUser(), self.topic.forum) @@ -425,7 +425,7 @@ def test_post_has_no_upvote(self): response = self.client.get(self.url) self.assertContains( - response, '0', status_code=200 + response, '0', status_code=200 ) def test_post_has_upvote_by_user(self): @@ -435,7 +435,7 @@ def test_post_has_upvote_by_user(self): response = self.client.get(self.url) self.assertContains( - response, '1', status_code=200 + response, '1', status_code=200 ) def test_certified_post_is_highlighted(self): @@ -525,7 +525,7 @@ def test_has_liked(self): self.client.force_login(self.user) response = self.client.get(self.url) # icon: solid heart - self.assertContains(response, '1') + self.assertContains(response, '1') def test_queryset(self): TopicFactory(with_post=True, forum=ForumFactory(kind=ForumKind.PRIVATE_FORUM, with_public_perms=True)) @@ -619,11 +619,11 @@ def test_showmoretopics_url_with_params(self): def test_filter_dropdown_visibility(self): response = self.client.get(self.url) - self.assertContains(response, '