'Allow deletion of a setting in an overridden settings set (#18824)'

def test_override_settings_delete(self):

    previous_i18n = settings.USE_I18N
    previous_l10n = settings.USE_L10N
    with self.settings(USE_I18N=False):
        del settings.USE_I18N
        with self.assertRaises(AttributeError):
            getattr(settings, 'USE_I18N')
        del settings.USE_L10N
        with self.assertRaises(AttributeError):
            getattr(settings, 'USE_L10N')
        self.assertNotIn('USE_I18N', dir(settings))
        self.assertNotIn('USE_L10N', dir(settings))
    self.assertEqual(settings.USE_I18N, previous_i18n)
    self.assertEqual(settings.USE_L10N, previous_l10n)
