          class B(A):
              def _get_do(self):
                  return "DO IT"
  
          self.assertRaises(NotImplementedError, lambda: A().do)
          self.assertEqual(B().do, 'DO IT')
  
      def test_lazy_object_to_string(self):
  
          class Klazz(object):
 
</s> remove         self.assertRaises(ValueError, NoModelModelForm)
 </s> add         with self.assertRaises(ValueError):
            NoModelModelForm() </s> remove         self.assertRaises(TypeError, build_no_cbc)
 </s> add         with self.assertRaises(TypeError):
            build_no_cbc() </s> remove         self.assertRaises(ImproperlyConfigured, lambda: reverse('account:register'))
 </s> add         with self.assertRaises(ImproperlyConfigured):
            reverse('account:register') </s> remove         self.assertRaises(TypeError, build_no_base_classes)
 </s> add         with self.assertRaises(TypeError):
            build_no_base_classes() </s> remove         self.assertRaises(TypeError, build_abc)
 </s> add         with self.assertRaises(TypeError):
            build_abc()
        with self.assertRaises(NotImplementedError):
            A().do
          class B(A):
              def _get_do(self):
                  return "DO IT"
  
        with self.assertRaises(NotImplementedError):
            A().do
          self.assertEqual(B().do, 'DO IT')
  
      def test_lazy_object_to_string(self):
  
          class Klazz(object):
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/utils_tests/test_functional.py