-
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.
refactor(BlockedPostReason): remplace Enum avec models.TextChoices
- Loading branch information
1 parent
8b5ce01
commit 9b46db4
Showing
8 changed files
with
37 additions
and
23 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 |
---|---|---|
|
@@ -391,7 +391,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.value | ||
assert blocked_post.block_reason == BlockedPostReason.BLOCKED_USER.label | ||
|
||
def test_create_post_with_nonfr_content(self): | ||
assign_perm("can_reply_to_topics", self.user, self.topic.forum) | ||
|
@@ -419,7 +419,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.value | ||
assert blocked_post.block_reason == BlockedPostReason.ALTERNATIVE_LANGUAGE.label | ||
|
||
def test_create_post_with_html_content(self): | ||
assign_perm("can_reply_to_topics", self.user, self.topic.forum) | ||
|
@@ -477,7 +477,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.value | ||
assert blocked_post.block_reason == BlockedPostReason.BLOCKED_DOMAIN.label | ||
|
||
|
||
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
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