def test_one_feedback_with_multiple_users_is_pseudonymized(self):
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    feedback_mappings_1 = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id).pseudonymizable_entity_mappings[models.NAMES.feedback]
    feedback_thread_model = feedback_models.GeneralFeedbackThreadModel.get_by_id(self.FEEDBACK_1_ID)
    self.assertEqual(feedback_thread_model.original_author_id, feedback_mappings_1[self.FEEDBACK_1_ID])
    self.assertEqual(feedback_thread_model.last_nonempty_message_author_id, self.user_2_id)
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_2_id))
    feedback_mappings_2 = user_models.PendingDeletionRequestModel.get_by_id(self.user_2_id).pseudonymizable_entity_mappings[models.NAMES.feedback]
    self.assertEqual(feedback_thread_model.last_nonempty_message_author_id, feedback_mappings_2[self.FEEDBACK_1_ID])
def test_one_feedback_with_multiple_users_is_pseudonymized(self):
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    feedback_mappings_1 = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id).pseudonymizable_entity_mappings[models.NAMES.feedback]
    feedback_thread_model = feedback_models.GeneralFeedbackThreadModel.get_by_id(self.FEEDBACK_1_ID)
    self.assertEqual(feedback_thread_model.original_author_id, feedback_mappings_1[self.FEEDBACK_1_ID])
    self.assertEqual(feedback_thread_model.last_nonempty_message_author_id, self.user_2_id)
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_2_id))
    feedback_mappings_2 = user_models.PendingDeletionRequestModel.get_by_id(self.user_2_id).pseudonymizable_entity_mappings[models.NAMES.feedback]
    self.assertEqual(feedback_thread_model.last_nonempty_message_author_id, feedback_mappings_2[self.FEEDBACK_1_ID])