def test_rep_for_question_comment_novote_deleted(self): """Rep is unchanged for a hard delete of a no vote on a comment on a question. """ vote = QuestionCommentVoteFactory(vote=0) vote.delete() self.assertEqual( vote.voted_on.author.reputation, self.reputation_history(vote.voted_on.author)[2] )
def test_rep_for_question_comment_upvote_deleted(self): """Rep is changed for a hard delete of an upvote on a comment on a question. """ vote = QuestionCommentVoteFactory(vote=1) vote.delete() self.assertEqual( vote.voted_on.author.reputation, self.reputation_history(vote.voted_on.author)[2] - config.TINE_REP_FOR_QUESTION_COMMENT_UPVOTE )
def test_rep_for_question_comment_novote_to_downvote(self): """Rep changed for no vote changed to a downvote on a comment on a question. """ vote = QuestionCommentVoteFactory(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_QUESTION_COMMENT_DOWNVOTE )