def test_after_deletion_user_and_its_profiles_cannot_do_anything(self):
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    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_services.get_user_settings(self.user_1_id))
    self.assertIsNone(user_services.get_user_settings(self.profile_user_id))
    with self.assertRaisesRegexp(Exception, 'User not found.'):
        user_services.update_preferred_language_codes(self.user_1_id, ['en'])
    with self.assertRaisesRegexp(Exception, 'User not found.'):
        user_services.update_preferred_language_codes(self.profile_user_id, ['en'])
def test_after_deletion_user_and_its_profiles_cannot_do_anything(self):
    wipeout_service.pre_delete_user(self.user_1_id)
    self.process_and_flush_pending_tasks()
    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_services.get_user_settings(self.user_1_id))
    self.assertIsNone(user_services.get_user_settings(self.profile_user_id))
    with self.assertRaisesRegexp(Exception, 'User not found.'):
        user_services.update_preferred_language_codes(self.user_1_id, ['en'])
    with self.assertRaisesRegexp(Exception, 'User not found.'):
        user_services.update_preferred_language_codes(self.profile_user_id, ['en'])