def test_multiple_config_properties_with_multiple_users_are_pseudonymized(self):
    config_models.ConfigPropertyModel(id=self.CONFIG_2_ID, value='b').commit(self.user_2_id, [{'cmd': 'command'}])
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    config_mappings_1 = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id).pseudonymizable_entity_mappings[models.NAMES.config]
    metadata_model_1 = config_models.ConfigPropertySnapshotMetadataModel.get_by_id(('%s-1' % self.CONFIG_1_ID))
    self.assertEqual(metadata_model_1.committer_id, config_mappings_1[self.CONFIG_1_ID])
    metadata_model_2 = config_models.ConfigPropertySnapshotMetadataModel.get_by_id(('%s-1' % self.CONFIG_2_ID))
    self.assertEqual(metadata_model_2.committer_id, self.user_2_id)
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_2_id))
    config_mappings_2 = user_models.PendingDeletionRequestModel.get_by_id(self.user_2_id).pseudonymizable_entity_mappings[models.NAMES.config]
    metadata_model_3 = config_models.ConfigPropertySnapshotMetadataModel.get_by_id(('%s-1' % self.CONFIG_2_ID))
    self.assertEqual(metadata_model_3.committer_id, config_mappings_2[self.CONFIG_2_ID])
def test_multiple_config_properties_with_multiple_users_are_pseudonymized(self):
    config_models.ConfigPropertyModel(id=self.CONFIG_2_ID, value='b').commit(self.user_2_id, [{'cmd': 'command'}])
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    config_mappings_1 = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id).pseudonymizable_entity_mappings[models.NAMES.config]
    metadata_model_1 = config_models.ConfigPropertySnapshotMetadataModel.get_by_id(('%s-1' % self.CONFIG_1_ID))
    self.assertEqual(metadata_model_1.committer_id, config_mappings_1[self.CONFIG_1_ID])
    metadata_model_2 = config_models.ConfigPropertySnapshotMetadataModel.get_by_id(('%s-1' % self.CONFIG_2_ID))
    self.assertEqual(metadata_model_2.committer_id, self.user_2_id)
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_2_id))
    config_mappings_2 = user_models.PendingDeletionRequestModel.get_by_id(self.user_2_id).pseudonymizable_entity_mappings[models.NAMES.config]
    metadata_model_3 = config_models.ConfigPropertySnapshotMetadataModel.get_by_id(('%s-1' % self.CONFIG_2_ID))
    self.assertEqual(metadata_model_3.committer_id, config_mappings_2[self.CONFIG_2_ID])