def test_pre_delete_user_exploration_ownership_is_released(self):
    self.save_new_valid_exploration('exp_id', self.user_1_id)
    self.publish_exploration(self.user_1_id, 'exp_id')
    rights_manager.assign_role_for_exploration(user_services.get_system_user(), 'exp_id', self.user_2_id, feconf.ROLE_EDITOR)
    exp_summary_model = exp_models.ExpSummaryModel.get_by_id('exp_id')
    self.assertFalse(exp_summary_model.community_owned)
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    exp_summary_model = exp_models.ExpSummaryModel.get_by_id('exp_id')
    self.assertTrue(exp_summary_model.community_owned)
def test_pre_delete_user_exploration_ownership_is_released(self):
    self.save_new_valid_exploration('exp_id', self.user_1_id)
    self.publish_exploration(self.user_1_id, 'exp_id')
    rights_manager.assign_role_for_exploration(user_services.get_system_user(), 'exp_id', self.user_2_id, feconf.ROLE_EDITOR)
    exp_summary_model = exp_models.ExpSummaryModel.get_by_id('exp_id')
    self.assertFalse(exp_summary_model.community_owned)
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    exp_summary_model = exp_models.ExpSummaryModel.get_by_id('exp_id')
    self.assertTrue(exp_summary_model.community_owned)