          self.assertEqual(self.a.full_name, 'John Lennon')
  
      def test_setter(self):
          # The "full_name" property hasn't provided a "set" method.
          self.assertRaises(AttributeError, setattr, self.a, 'full_name', 'Paul McCartney')
  
          # And cannot be used to initialize the class.
          with self.assertRaisesMessage(TypeError, "'full_name' is an invalid keyword argument"):
              Person(full_name='Paul McCartney')
  
 
</s> remove         self.assertRaises(AttributeError, lambda: CommonInfo.objects.all())
 </s> add         with self.assertRaises(AttributeError):
            CommonInfo.objects.all() </s> remove         self.assertRaises(FieldError, test_gmbh.save)
 </s> add         with self.assertRaises(FieldError):
            test_gmbh.save() </s> remove         self.assertRaises(AttributeError, self.client.get, "/dates/books/2008/oct/01/nopk/")
 </s> add         with self.assertRaises(AttributeError):
            self.client.get("/dates/books/2008/oct/01/nopk/") </s> remove         self.assertRaises(ValueError, setattr, p, 'restaurant', None)
 </s> add         with self.assertRaises(ValueError):
            setattr(p, 'restaurant', None) </s> remove         self.assertRaises(ValueError, setattr, p, 'restaurant', p)
 </s> add         with self.assertRaises(ValueError):
            setattr(p, 'restaurant', p)
        with self.assertRaises(AttributeError):
            setattr(self.a, 'full_name', 'Paul McCartney')
          self.assertEqual(self.a.full_name, 'John Lennon')
  
      def test_setter(self):
          # The "full_name" property hasn't provided a "set" method.
        with self.assertRaises(AttributeError):
            setattr(self.a, 'full_name', 'Paul McCartney')
  
          # And cannot be used to initialize the class.
          with self.assertRaisesMessage(TypeError, "'full_name' is an invalid keyword argument"):
              Person(full_name='Paul McCartney')
  
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/properties/tests.py