def test_pre_delete_user_with_activities_multiple_owners(self):
    user_services.update_user_role(self.user_1_id, feconf.ROLE_ID_COLLECTION_EDITOR)
    self.save_new_valid_exploration('exp_id', self.user_1_id)
    rights_manager.assign_role_for_exploration(self.user_1_actions, 'exp_id', self.user_2_id, rights_domain.ROLE_OWNER)
    self.save_new_valid_collection('col_id', self.user_1_id, exploration_id='exp_id')
    rights_manager.assign_role_for_collection(self.user_1_actions, 'col_id', self.user_2_id, rights_domain.ROLE_OWNER)
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    pending_deletion_model = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id)
    self.assertIsNotNone(pending_deletion_model)
def test_pre_delete_user_with_activities_multiple_owners(self):
    user_services.update_user_role(self.user_1_id, feconf.ROLE_ID_COLLECTION_EDITOR)
    self.save_new_valid_exploration('exp_id', self.user_1_id)
    rights_manager.assign_role_for_exploration(self.user_1_actions, 'exp_id', self.user_2_id, rights_domain.ROLE_OWNER)
    self.save_new_valid_collection('col_id', self.user_1_id, exploration_id='exp_id')
    rights_manager.assign_role_for_collection(self.user_1_actions, 'col_id', self.user_2_id, rights_domain.ROLE_OWNER)
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    pending_deletion_model = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id)
    self.assertIsNotNone(pending_deletion_model)