def test_pre_delete_user_collection_user_is_deassigned(self):
    self.save_new_valid_collection('col_id', self.user_1_id)
    rights_manager.assign_role_for_collection(user_services.get_system_user(), 'col_id', self.user_2_id, feconf.ROLE_EDITOR)
    collection_summary_model = collection_models.CollectionSummaryModel.get_by_id('col_id')
    self.assertEqual(collection_summary_model.editor_ids, [self.user_2_id])
    wipeout_service.pre_delete_user(self.user_2_id)
    self.process_and_flush_pending_tasks()
    collection_summary_model = collection_models.CollectionSummaryModel.get_by_id('col_id')
    self.assertEqual(collection_summary_model.editor_ids, [])
def test_pre_delete_user_collection_user_is_deassigned(self):
    self.save_new_valid_collection('col_id', self.user_1_id)
    rights_manager.assign_role_for_collection(user_services.get_system_user(), 'col_id', self.user_2_id, feconf.ROLE_EDITOR)
    collection_summary_model = collection_models.CollectionSummaryModel.get_by_id('col_id')
    self.assertEqual(collection_summary_model.editor_ids, [self.user_2_id])
    wipeout_service.pre_delete_user(self.user_2_id)
    self.process_and_flush_pending_tasks()
    collection_summary_model = collection_models.CollectionSummaryModel.get_by_id('col_id')
    self.assertEqual(collection_summary_model.editor_ids, [])