-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(forum_moderation): motif de blocage illisible dans l'admin (#672)
## Description 🎸 Validation complete de `blocked_reason` pendant la conversion d'une poste 🎸 Migration pour les objets existants ## Type de changement 🪲 Correction de bug (changement non cassant qui corrige un problème). ### Captures d'écran (optionnel) <img width="1042" alt="Screenshot 2024-06-12 at 13 32 31" src="https://github.com/gip-inclusion/itou-communaute-django/assets/10801930/9ce046f0-875f-4f45-bf56-76db9693006c">
- Loading branch information
1 parent
6f8bf3c
commit 5480394
Showing
6 changed files
with
17 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -322,7 +322,7 @@ def test_create_post_as_blocked_not_blocked_anonymous(self, *args): | |
blocked_post = BlockedPost.objects.get() | ||
assert blocked_post.content == self.content | ||
assert blocked_post.username == username | ||
assert blocked_post.block_reason == BlockedPostReason.BLOCKED_USER.label | ||
assert blocked_post.block_reason == BlockedPostReason.BLOCKED_USER | ||
|
||
def test_create_post_with_nonfr_content(self): | ||
assign_perm("can_reply_to_topics", self.user, self.topic.forum) | ||
|
@@ -350,7 +350,7 @@ def test_create_post_with_nonfr_content(self): | |
blocked_post = BlockedPost.objects.get() | ||
assert blocked_post.poster == self.user | ||
assert blocked_post.content == "популярные лучшие песни слушать онлайн" | ||
assert blocked_post.block_reason == BlockedPostReason.ALTERNATIVE_LANGUAGE.label | ||
assert blocked_post.block_reason == BlockedPostReason.ALTERNATIVE_LANGUAGE | ||
|
||
def test_create_post_with_html_content(self): | ||
assign_perm("can_reply_to_topics", self.user, self.topic.forum) | ||
|
@@ -408,7 +408,7 @@ def test_create_post_with_blocked_domain_name(self): | |
blocked_post = BlockedPost.objects.get() | ||
assert blocked_post.content == "la communauté" | ||
assert blocked_post.username == "[email protected]" | ||
assert blocked_post.block_reason == BlockedPostReason.BLOCKED_DOMAIN.label | ||
assert blocked_post.block_reason == BlockedPostReason.BLOCKED_DOMAIN | ||
|
||
|
||
class CertifiedPostViewTest(TestCase): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters