          # Even though p.supplier for a Place 'p' (a parent of a Supplier), a
          # Restaurant object cannot access that reverse relation, since it's not
          # part of the Place-Supplier Hierarchy.
          self.assertQuerysetEqual(Place.objects.filter(supplier__name="foo"), [])
          self.assertRaises(FieldError, Restaurant.objects.filter, supplier__name="foo")
  
      def test_model_with_distinct_accessors(self):
          # The Post model has distinct accessors for the Comment and Link models.
          post = Post.objects.create(title="Lorem Ipsum")
          post.attached_comment_set.create(content="Save $ on V1agr@", is_spam=True)
 
</s> remove         self.assertRaises(AttributeError, lambda: CommonInfo.objects.all())
 </s> add         with self.assertRaises(AttributeError):
            CommonInfo.objects.all() </s> remove         self.assertRaises(
            AttributeError, getattr, post, "attached_%(class)s_set"
        )
 </s> add         with self.assertRaises(AttributeError):
            getattr(post, "attached_%(class)s_set") </s> remove         self.assertRaises(TypeError, City.objects.svg, precision='foo')
 </s> add         with self.assertRaises(TypeError):
            City.objects.svg(precision='foo') </s> remove             self.assertRaises(Director.DoesNotExist, lambda: private_school.director)
 </s> add             with self.assertRaises(Director.DoesNotExist):
                private_school.director </s> remove         self.assertRaises(
            Restaurant.DoesNotExist, lambda: p.restaurant
        )
 </s> add         with self.assertRaises(Restaurant.DoesNotExist):
            p.restaurant
        with self.assertRaises(FieldError):
            Restaurant.objects.filter(supplier__name="foo")
          # Even though p.supplier for a Place 'p' (a parent of a Supplier), a
          # Restaurant object cannot access that reverse relation, since it's not
          # part of the Place-Supplier Hierarchy.
          self.assertQuerysetEqual(Place.objects.filter(supplier__name="foo"), [])
        with self.assertRaises(FieldError):
            Restaurant.objects.filter(supplier__name="foo")
  
      def test_model_with_distinct_accessors(self):
          # The Post model has distinct accessors for the Comment and Link models.
          post = Post.objects.create(title="Lorem Ipsum")
          post.attached_comment_set.create(content="Save $ on V1agr@", is_spam=True)
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/model_inheritance/tests.py