          """Test related to #13085"""
          # Fails with another, ORM-level error
          dev1 = Developer(name='Joe')
          note = Note(note='Deserves promotion', content_object=dev1)
          self.assertRaises(IntegrityError, note.save)
  
      def test_target_model_len_zero(self):
          """Test for #13085 -- __len__() returns 0"""
          team1 = Team.objects.create(name='Backend devs')
          try:
 
</s> remove             self.assertRaises(Director.DoesNotExist, lambda: private_school.director)
 </s> add             with self.assertRaises(Director.DoesNotExist):
                private_school.director </s> remove         self.assertRaises(IntegrityError, a.protect.delete)
 </s> add         with self.assertRaises(IntegrityError):
            a.protect.delete() </s> remove         self.assertRaises(KeyError, q.__getitem__, 'bar')
        self.assertRaises(AttributeError, q.__setitem__, 'something', 'bar')
 </s> add         with self.assertRaises(KeyError):
            q.__getitem__('bar')
        with self.assertRaises(AttributeError):
            q.__setitem__('something', 'bar') </s> remove         self.assertRaises(TypeError, LayerMapping, County, co_shp, bad_fk_map1, transform=False)
        self.assertRaises(LayerMapError, LayerMapping, County, co_shp, bad_fk_map2, transform=False)
 </s> add         with self.assertRaises(TypeError):
            LayerMapping(County, co_shp, bad_fk_map1, transform=False)
        with self.assertRaises(LayerMapError):
            LayerMapping(County, co_shp, bad_fk_map2, transform=False) </s> remove         self.assertRaises(IntegrityError, Tag.objects.create, title="bar", slug="foo")
 </s> add         with self.assertRaises(IntegrityError):
            Tag.objects.create(title="bar", slug="foo")
        with self.assertRaises(IntegrityError):
            note.save()
          """Test related to #13085"""
          # Fails with another, ORM-level error
          dev1 = Developer(name='Joe')
          note = Note(note='Deserves promotion', content_object=dev1)
        with self.assertRaises(IntegrityError):
            note.save()
  
      def test_target_model_len_zero(self):
          """Test for #13085 -- __len__() returns 0"""
          team1 = Team.objects.create(name='Backend devs')
          try:
keep keep keep keep replace keep keep keep keep keep
 Refs #26022 -- Used context manager version of assertRaises in tests. 
tests/generic_relations_regress/tests.py