Skip to content

Commit

Permalink
增加评论审核开关
Browse files Browse the repository at this point in the history
  • Loading branch information
liangliangyy committed May 9, 2023
1 parent 17d8abb commit 8213478
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions comments/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from blog.models import Category, Article
from comments.models import Comment
from comments.templatetags.comments_tags import *
from djangoblog.utils import get_current_site
from djangoblog.utils import get_max_articleid_commentid


Expand All @@ -16,6 +15,10 @@ class CommentsTest(TestCase):
def setUp(self):
self.client = Client()
self.factory = RequestFactory()
from blog.models import BlogSettings
value = BlogSettings()
value.comment_need_review = True
value.save()

def update_article_comment_status(self, article):
comments = article.comment_set.all()
Expand All @@ -24,7 +27,6 @@ def update_article_comment_status(self, article):
comment.save()

def test_validate_comment(self):
site = get_current_site().domain
user = BlogUser.objects.create_superuser(
email="liangliangyy1@gmail.com",
username="liangliangyy1",
Expand Down

0 comments on commit 8213478

Please sign in to comment.