def test_pre_delete_user_user_is_deassigned_from_topics(self):
    self.save_new_topic('top_id', self.user_1_id)
    topic_services.assign_role(user_services.get_system_user(), self.user_1_actions, feconf.ROLE_MANAGER, 'top_id')
    top_rights_model = topic_models.TopicRightsModel.get_by_id('top_id')
    self.assertEqual(top_rights_model.manager_ids, [self.user_1_id])
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    top_rights_model = topic_models.TopicRightsModel.get_by_id('top_id')
    self.assertEqual(top_rights_model.manager_ids, [])
def test_pre_delete_user_user_is_deassigned_from_topics(self):
    self.save_new_topic('top_id', self.user_1_id)
    topic_services.assign_role(user_services.get_system_user(), self.user_1_actions, feconf.ROLE_MANAGER, 'top_id')
    top_rights_model = topic_models.TopicRightsModel.get_by_id('top_id')
    self.assertEqual(top_rights_model.manager_ids, [self.user_1_id])
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    top_rights_model = topic_models.TopicRightsModel.get_by_id('top_id')
    self.assertEqual(top_rights_model.manager_ids, [])