def test_one_collection_commit_log_is_pseudonymized(self):
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    collection_mappings = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id).pseudonymizable_entity_mappings[models.NAMES.collection]
    commit_log_model_1 = collection_models.CollectionCommitLogEntryModel.get_by_id(('rights-%s-2' % self.COL_1_ID))
    self.assertEqual(commit_log_model_1.user_id, collection_mappings[self.COL_1_ID])
    commit_log_model_2 = collection_models.CollectionCommitLogEntryModel.get_by_id(('rights-%s-3' % self.COL_1_ID))
    self.assertEqual(commit_log_model_2.user_id, collection_mappings[self.COL_1_ID])
def test_one_collection_commit_log_is_pseudonymized(self):
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    collection_mappings = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id).pseudonymizable_entity_mappings[models.NAMES.collection]
    commit_log_model_1 = collection_models.CollectionCommitLogEntryModel.get_by_id(('rights-%s-2' % self.COL_1_ID))
    self.assertEqual(commit_log_model_1.user_id, collection_mappings[self.COL_1_ID])
    commit_log_model_2 = collection_models.CollectionCommitLogEntryModel.get_by_id(('rights-%s-3' % self.COL_1_ID))
    self.assertEqual(commit_log_model_2.user_id, collection_mappings[self.COL_1_ID])