def test_pre_delete_user_without_activities_works_correctly(self):
    user_models.UserSubscriptionsModel(id=self.user_1_id, exploration_ids=[], collection_ids=[]).put()
    user_settings = user_services.get_user_settings(self.user_1_id)
    self.assertFalse(user_settings.deleted)
    user_auth_details = auth_models.UserAuthDetailsModel.get(self.user_1_id)
    self.assertFalse(user_auth_details.deleted)
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    user_settings = user_models.UserSettingsModel.get_by_id(self.user_1_id)
    self.assertTrue(user_settings.deleted)
    self.assertIsNone(auth_services.get_auth_id_from_user_id(self.user_1_id))
    pending_deletion_model = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id)
    self.assertIsNotNone(pending_deletion_model)
def test_pre_delete_user_without_activities_works_correctly(self):
    user_models.UserSubscriptionsModel(id=self.user_1_id, exploration_ids=[], collection_ids=[]).put()
    user_settings = user_services.get_user_settings(self.user_1_id)
    self.assertFalse(user_settings.deleted)
    user_auth_details = auth_models.UserAuthDetailsModel.get(self.user_1_id)
    self.assertFalse(user_auth_details.deleted)
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    user_settings = user_models.UserSettingsModel.get_by_id(self.user_1_id)
    self.assertTrue(user_settings.deleted)
    self.assertIsNone(auth_services.get_auth_id_from_user_id(self.user_1_id))
    pending_deletion_model = user_models.PendingDeletionRequestModel.get_by_id(self.user_1_id)
    self.assertIsNotNone(pending_deletion_model)