          errors = ConfusedArticle.check()
          expected = [
              checks.Error(
                  "CurrentSiteManager cannot use 'ConfusedArticle.site' as it is "
                  "not a ForeignKey or ManyToManyField.",
                  obj=ConfusedArticle.on_site,
                  id='sites.E002',
              )
          ]
          self.assertEqual(errors, expected)
 
</s> remove                     "CurrentSiteManager cannot use '%s.%s' as it is not a ForeignKey or ManyToManyField." % (
 </s> add                     "CurrentSiteManager cannot use '%s.%s' as it is not a foreign key or a many-to-many field." % ( </s> remove                 "The value of 'fieldsets[1][1][\"fields\"]' cannot include the ManyToManyField "
                "'authors', because that field manually specifies a relationship model.",
 </s> add                 "The value of 'fieldsets[1][1][\"fields\"]' cannot include the many-to-many field "
                "'authors' because that field manually specifies a relationship model.", </s> remove         if not isinstance(field, (models.ForeignKey, models.ManyToManyField)):
 </s> add         if not field.many_to_many and not isinstance(field, (models.ForeignKey)): </s> remove                 "The value of 'fields' cannot include the ManyToManyField 'authors', "
 </s> add                 "The value of 'fields' cannot include the many-to-many field 'authors' " </s> remove   ``ForeignKey`` or ``ManyToManyField``.
 </s> add   foreign key or a many-to-many field.
                "not a foreign key or a many-to-many field.",
          errors = ConfusedArticle.check()
          expected = [
              checks.Error(
                  "CurrentSiteManager cannot use 'ConfusedArticle.site' as it is "
                "not a foreign key or a many-to-many field.",
                  obj=ConfusedArticle.on_site,
                  id='sites.E002',
              )
          ]
          self.assertEqual(errors, expected)
keep keep keep keep replace keep keep keep keep keep
 Refs #24227 -- Replaced M2M isinstance checks by field.many_to_many

Thanks Markus Holtermann, Collin Anderson and Tim Graham for the reviews. 
tests/sites_framework/tests.py