def test_rep_for_answer_comment_novote_deleted(self): """Rep is unchanged for a hard delete of a no vote on a comment on a answer. """ vote = AnswerCommentVoteFactory(vote=0) vote.delete() self.assertEqual( vote.voted_on.author.reputation, self.reputation_history(vote.voted_on.author)[2] )
def test_rep_for_answer_comment_upvote_deleted(self): """Rep is changed for a hard delete of an upvote on a comment on a answer. """ vote = AnswerCommentVoteFactory(vote=1) vote.delete() self.assertEqual( vote.voted_on.author.reputation, self.reputation_history(vote.voted_on.author)[2] - config.TINE_REP_FOR_ANSWER_COMMENT_UPVOTE )
def test_rep_for_answer_comment_novote_to_downvote(self): """Rep changed for no vote changed to a downvote on a comment on a answer. """ vote = AnswerCommentVoteFactory(vote=0) vote.vote = -1 vote.save() self.assertEqual( vote.voted_on.author.reputation, self.reputation_history(vote.voted_on.author)[2] + config.TINE_REP_FOR_ANSWER_COMMENT_DOWNVOTE )