Exemple #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
Exemple #2
0
 def comment_obj(self, content):
     comment = CommentFactory.build(content=content)
     return comment
Exemple #3
0
 def comment_obj(self):
     comment = CommentFactory.build()
     return comment
Exemple #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
Exemple #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
Exemple #6
0
 def comment_obj(self, parent_comment):
     comment = CommentFactory.build(parent_id=parent_comment.id)
     return comment
Exemple #7
0
 def comment_obj(self, parent_comment):
     wrong_id = parent_comment.id + 123
     comment = CommentFactory.build(parent_id=wrong_id)
     return comment
Exemple #8
0
 def comment(self, logged_in_user):
     return CommentFactory.create(author=logged_in_user.id)
Exemple #9
0
 def parent_comment(self, target_comment_group):
     comment = CommentFactory(comment_group_id=target_comment_group.id)
     return comment
Exemple #10
0
 def comment(self):
     return CommentFactory.create()
Exemple #11
0
 def comment(self, post):
     return CommentFactory.create(post=post, is_reply=False)
Exemple #12
0
 def comment(self, post):
     return CommentFactory.create(post=post)
Exemple #13
0
 def comment(self, post, logged_in_user):
     return CommentFactory.create(post=post,
                                  likes=[str(logged_in_user.id)])
Exemple #14
0
 def comment(self, post, logged_in_user):
     return CommentFactory.create(post=post, author=logged_in_user)