def test_delete_user_for_full_user_and_its_profiles_is_successful(self):
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    self.assertIsNone(auth_services.get_auth_id_from_user_id(self.user_1_id))
    self.assertFalse(auth_services.verify_external_auth_associations_are_deleted(self.user_1_id))
    self.assertIsNotNone(user_models.CompletedActivitiesModel.get_by_id(self.profile_user_id))
    self.assertIsNotNone(user_models.IncompleteActivitiesModel.get_by_id(self.profile_user_id))
    self.assertIsNotNone(user_models.LearnerPlaylistModel.get_by_id(self.profile_user_id))
    self.assertIsNotNone(user_models.UserEmailPreferencesModel.get_by_id(self.user_1_id))
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.profile_user_id))
    self.assertIsNone(user_models.CompletedActivitiesModel.get_by_id(self.profile_user_id))
    self.assertIsNone(user_models.IncompleteActivitiesModel.get_by_id(self.profile_user_id))
    self.assertIsNone(user_models.LearnerPlaylistModel.get_by_id(self.profile_user_id))
    self.assertIsNone(user_models.UserEmailPreferencesModel.get_by_id(self.user_1_id))
def test_delete_user_for_full_user_and_its_profiles_is_successful(self):
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    self.assertIsNone(auth_services.get_auth_id_from_user_id(self.user_1_id))
    self.assertFalse(auth_services.verify_external_auth_associations_are_deleted(self.user_1_id))
    self.assertIsNotNone(user_models.CompletedActivitiesModel.get_by_id(self.profile_user_id))
    self.assertIsNotNone(user_models.IncompleteActivitiesModel.get_by_id(self.profile_user_id))
    self.assertIsNotNone(user_models.LearnerPlaylistModel.get_by_id(self.profile_user_id))
    self.assertIsNotNone(user_models.UserEmailPreferencesModel.get_by_id(self.user_1_id))
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.user_1_id))
    wipeout_service.delete_user(wipeout_service.get_pending_deletion_request(self.profile_user_id))
    self.assertIsNone(user_models.CompletedActivitiesModel.get_by_id(self.profile_user_id))
    self.assertIsNone(user_models.IncompleteActivitiesModel.get_by_id(self.profile_user_id))
    self.assertIsNone(user_models.LearnerPlaylistModel.get_by_id(self.profile_user_id))
    self.assertIsNone(user_models.UserEmailPreferencesModel.get_by_id(self.user_1_id))