def test_one_subtopic_is_pseudonymized(self):
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    subtopic_mappings = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id).pseudonymizable_entity_mappings[models.NAMES.subtopic]
    metadata_model = subtopic_models.SubtopicPageSnapshotMetadataModel.get_by_id(('%s-%s-1' % (self.TOP_1_ID, self.SUBTOP_1_ID)))
    self.assertEqual(metadata_model.committer_id, subtopic_mappings[('%s-%s' % (self.TOP_1_ID, self.SUBTOP_1_ID))])
    commit_log_model = subtopic_models.SubtopicPageCommitLogEntryModel.get_by_id(('subtopicpage-%s-%s-1' % (self.TOP_1_ID, self.SUBTOP_1_ID)))
    self.assertEqual(commit_log_model.user_id, subtopic_mappings[('%s-%s' % (self.TOP_1_ID, self.SUBTOP_1_ID))])
def test_one_subtopic_is_pseudonymized(self):
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    subtopic_mappings = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id).pseudonymizable_entity_mappings[models.NAMES.subtopic]
    metadata_model = subtopic_models.SubtopicPageSnapshotMetadataModel.get_by_id(('%s-%s-1' % (self.TOP_1_ID, self.SUBTOP_1_ID)))
    self.assertEqual(metadata_model.committer_id, subtopic_mappings[('%s-%s' % (self.TOP_1_ID, self.SUBTOP_1_ID))])
    commit_log_model = subtopic_models.SubtopicPageCommitLogEntryModel.get_by_id(('subtopicpage-%s-%s-1' % (self.TOP_1_ID, self.SUBTOP_1_ID)))
    self.assertEqual(commit_log_model.user_id, subtopic_mappings[('%s-%s' % (self.TOP_1_ID, self.SUBTOP_1_ID))])