def public_comment(self, user, contributor, public_project): public_comment = CommentFactory(node=public_project, user=contributor) public_comment.reports = {user._id: { 'category': 'spam', 'text': 'This is spam', 'date': timezone.now(), 'retracted': False, }} public_comment.save() return public_comment
def public_comment(self, user, contributor, public_project, public_wiki): public_comment = CommentFactory(node=public_project, target=Guid.load(public_wiki._id), user=contributor) public_comment.reports = {user._id: { 'category': 'spam', 'text': 'This is spam', 'date': timezone.now(), 'retracted': False, }} public_comment.save() return public_comment
def comment(self, user, contributor, private_project, wiki): comment = CommentFactory(node=private_project, target=Guid.load(wiki._id), user=contributor) comment.reports = {user._id: { 'category': 'spam', 'text': 'This is spam', 'date': timezone.now(), 'retracted': False, }} comment.save() return comment
def public_comment(self, user, contributor, public_project, public_file): public_comment = CommentFactory(node=public_project, target=public_file.get_guid(), user=contributor) public_comment.reports = public_comment.reports or {} public_comment.reports[user._id] = { 'category': 'spam', 'text': 'This is spam', 'date': timezone.now(), 'retracted': False, } public_comment.save() return public_comment
def comment(self, user, contributor, private_project, file): comment = CommentFactory(node=private_project, target=file.get_guid(), user=contributor) comment.reports = comment.reports or {} comment.reports[user._id] = { 'category': 'spam', 'text': 'This is spam', 'date': timezone.now(), 'retracted': False, } comment.save() return comment
def comment(self, user, contributor, private_project, file): comment = CommentFactory( node=private_project, target=file.get_guid(), user=contributor) comment.reports = {user._id: { 'category': 'spam', 'text': 'This is spam', 'date': timezone.now(), 'retracted': False, }} comment.save() return comment