def test_rep_for_question_comment_unpublished(self): """Rep removed when published set to False on a question comment.""" comment = QuestionCommentFactory() comment.published = False comment.save() self.assertEqual( comment.author.reputation, self.reputation_history(comment.author)[0] )
def test_rep_for_question_comment_unpublished(self): """Rep not added upon creation of a question comment with published= False, added when published set to True. """ comment = QuestionCommentFactory(published=False) self.assertEqual( comment.author.reputation, self.reputation_history(comment.author)[0] ) comment.published = True comment.save() self.assertEqual( comment.author.reputation, self.reputation_history(comment.author)[0] + config.TINE_REP_FOR_QUESTION_COMMENT )