          self.assertRaises(AttributeError, getattr, settings, 'TEST')
          override.enable()
          self.assertEqual('override', settings.TEST)
          override.disable()
          self.assertRaises(AttributeError, getattr, settings, 'TEST')
  
      def test_class_decorator(self):
          # SimpleTestCase can be decorated by override_settings, but not ut.TestCase
          class SimpleTestCaseSubclass(SimpleTestCase):
              pass
 
</s> remove         self.assertRaises(AttributeError, getattr, settings, 'TEST')
 </s> add         with self.assertRaises(AttributeError):
            getattr(settings, 'TEST') </s> remove         self.assertRaises(AttributeError, getattr, settings, 'TEST')
 </s> add         with self.assertRaises(AttributeError):
            getattr(settings, 'TEST') </s> remove         self.assertRaises(AttributeError, getattr, settings, 'TEST')
 </s> add         with self.assertRaises(AttributeError):
            getattr(settings, 'TEST') </s> remove         self.assertRaises(AttributeError, getattr, settings, 'TEST')
        self.assertRaises(AttributeError, getattr, settings, 'TEST2')
 </s> add         with self.assertRaises(AttributeError):
            getattr(settings, 'TEST')
        with self.assertRaises(AttributeError):
            getattr(settings, 'TEST2') </s> remove         self.assertRaises(AttributeError, getattr, settings, 'TEST')
 </s> add         with self.assertRaises(AttributeError):
            getattr(settings, 'TEST')
        with self.assertRaises(AttributeError):
            getattr(settings, 'TEST')
          self.assertRaises(AttributeError, getattr, settings, 'TEST')
          override.enable()
          self.assertEqual('override', settings.TEST)
          override.disable()
        with self.assertRaises(AttributeError):
            getattr(settings, 'TEST')
  
      def test_class_decorator(self):
          # SimpleTestCase can be decorated by override_settings, but not ut.TestCase
          class SimpleTestCaseSubclass(SimpleTestCase):
              pass
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/settings_tests/tests.py