def test_pre_delete_user_email_subscriptions(self):
    email_preferences = user_services.get_email_preferences(self.user_1_id)
    self.assertEqual(email_preferences.can_receive_email_updates, feconf.DEFAULT_EMAIL_UPDATES_PREFERENCE)
    self.assertEqual(email_preferences.can_receive_editor_role_email, feconf.DEFAULT_EDITOR_ROLE_EMAIL_PREFERENCE)
    self.assertEqual(email_preferences.can_receive_feedback_message_email, feconf.DEFAULT_FEEDBACK_MESSAGE_EMAIL_PREFERENCE)
    self.assertEqual(email_preferences.can_receive_subscription_email, feconf.DEFAULT_SUBSCRIPTION_EMAIL_PREFERENCE)
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    email_preferences = user_services.get_email_preferences(self.user_1_id)
    self.assertFalse(email_preferences.can_receive_email_updates)
    self.assertFalse(email_preferences.can_receive_editor_role_email)
    self.assertFalse(email_preferences.can_receive_feedback_message_email)
    self.assertFalse(email_preferences.can_receive_subscription_email)
def test_pre_delete_user_email_subscriptions(self):
    email_preferences = user_services.get_email_preferences(self.user_1_id)
    self.assertEqual(email_preferences.can_receive_email_updates, feconf.DEFAULT_EMAIL_UPDATES_PREFERENCE)
    self.assertEqual(email_preferences.can_receive_editor_role_email, feconf.DEFAULT_EDITOR_ROLE_EMAIL_PREFERENCE)
    self.assertEqual(email_preferences.can_receive_feedback_message_email, feconf.DEFAULT_FEEDBACK_MESSAGE_EMAIL_PREFERENCE)
    self.assertEqual(email_preferences.can_receive_subscription_email, feconf.DEFAULT_SUBSCRIPTION_EMAIL_PREFERENCE)
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    email_preferences = user_services.get_email_preferences(self.user_1_id)
    self.assertFalse(email_preferences.can_receive_email_updates)
    self.assertFalse(email_preferences.can_receive_editor_role_email)
    self.assertFalse(email_preferences.can_receive_feedback_message_email)
    self.assertFalse(email_preferences.can_receive_subscription_email)