def test_rep_for_question_deleted(self):
     """Rep removed for a hard delete of a question."""
     question = QuestionFactory()
     question.delete()
     self.assertEqual(
         question.author.reputation,
         self.reputation_history(question.author)[0]
     )
 def test_rep_for_question_unpublished(self):
     """Rep removed when published set to False on a question."""
     question = QuestionFactory()
     question.published = False
     question.save()
     self.assertEqual(
         question.author.reputation,
         self.reputation_history(question.author)[0]
     )
 def test_rep_for_question_unpublished(self):
     """Rep not added upon creation of a question with published=False,
     added when published set to True.
     """
     question = QuestionFactory(published=False)
     self.assertEqual(
         question.author.reputation,
         self.reputation_history(question.author)[0]
     )
     question.published = True
     question.save()
     self.assertEqual(
         question.author.reputation,
         self.reputation_history(question.author)[0] +
         config.TINE_REP_FOR_QUESTION
     )