          #10811 -- Assigning an unsaved object to GenericForeignKey
          should raise an exception.
          """
          class Model(models.Model):
              content_type = models.ForeignKey(ContentType, null=True)
              object_id = models.PositiveIntegerField(null=True)
              content_object = GenericForeignKey('content_type', 'object_id')
  
          author = Author(name='Author')
          model = Model()
 
</s> remove             content_type = models.ForeignKey('self')  # should point to ContentType
 </s> add             content_type = models.ForeignKey('self', models.CASCADE)  # should point to ContentType </s> remove     content_type = models.ForeignKey(ContentType, related_name="taggeditem_set2")
 </s> add     content_type = models.ForeignKey(
        ContentType,
        models.CASCADE,
        related_name="taggeditem_set2",
    ) </s> remove     content_type = models.ForeignKey(ContentType)
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE) </s> remove     content_type = models.ForeignKey(ContentType, related_name='backend_tags')
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE, related_name='backend_tags') </s> remove     content_type = models.ForeignKey(ContentType)
 </s> add     content_type = models.ForeignKey(ContentType, models.CASCADE)
            content_type = models.ForeignKey(ContentType, models.SET_NULL, null=True)
          #10811 -- Assigning an unsaved object to GenericForeignKey
          should raise an exception.
          """
          class Model(models.Model):
            content_type = models.ForeignKey(ContentType, models.SET_NULL, null=True)
              object_id = models.PositiveIntegerField(null=True)
              content_object = GenericForeignKey('content_type', 'object_id')
  
          author = Author(name='Author')
          model = Model()
keep keep keep keep replace keep keep keep keep keep
 Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField 
tests/contenttypes_tests/tests.py