def test_rep_for_question_novote_to_downvote(self):
     """Rep changed for no vote changed to a downvote on a question."""
     vote = QuestionVoteFactory(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_DOWNVOTE
     )
 def test_rep_for_question_upvote_to_novote(self):
     """Rep changed for an upvote changed to no vote on a question."""
     vote = QuestionVoteFactory(vote=1)
     vote.vote = 0
     vote.save()
     self.assertEqual(
         vote.voted_on.author.reputation,
         self.reputation_history(vote.voted_on.author)[2] -
         config.TINE_REP_FOR_QUESTION_UPVOTE
     )