示例#1
0
 def target_comment(self, target_group, user):
     wrong_user = UserFactory()
     comment = CommentFactory(comment_group_id=target_group.id,
                              user_id=wrong_user.id,
                              user=wrong_user,
                              status=CommentStatus.DELETED)
     return comment
示例#2
0
 def comment_obj(self, content):
     comment = CommentFactory.build(content=content)
     return comment
示例#3
0
 def comment_obj(self):
     comment = CommentFactory.build()
     return comment
示例#4
0
 def target_comment(self, target_group, user):
     comment = CommentFactory(comment_group_id=target_group.id,
                              user_id=user.id,
                              user=user,
                              status=CommentStatus.DELETED)
     return comment
示例#5
0
 def target_comment(self, target_group, user):
     comment = CommentFactory(comment_group_id=target_group.id,
                              user_id=user.id,
                              user=user)
     return comment
示例#6
0
 def comment_obj(self, parent_comment):
     comment = CommentFactory.build(parent_id=parent_comment.id)
     return comment
示例#7
0
 def comment_obj(self, parent_comment):
     wrong_id = parent_comment.id + 123
     comment = CommentFactory.build(parent_id=wrong_id)
     return comment
示例#8
0
 def comment(self, logged_in_user):
     return CommentFactory.create(author=logged_in_user.id)
示例#9
0
 def parent_comment(self, target_comment_group):
     comment = CommentFactory(comment_group_id=target_comment_group.id)
     return comment
示例#10
0
 def comment(self):
     return CommentFactory.create()
示例#11
0
 def comment(self, post):
     return CommentFactory.create(post=post, is_reply=False)
示例#12
0
 def comment(self, post):
     return CommentFactory.create(post=post)
示例#13
0
 def comment(self, post, logged_in_user):
     return CommentFactory.create(post=post,
                                  likes=[str(logged_in_user.id)])
示例#14
0
 def comment(self, post, logged_in_user):
     return CommentFactory.create(post=post, author=logged_in_user)