  
          errors = FieldsetBookAdmin(Book, AdminSite()).check()
          expected = [
              checks.Error(
                  "The value of 'fieldsets[1][1][\"fields\"]' cannot include the ManyToManyField "
                  "'authors', because that field manually specifies a relationship model.",
                  obj=FieldsetBookAdmin,
                  id='admin.E013',
              )
          ]
          self.assertEqual(errors, expected)
 
</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                             "The value of '%s' cannot include the ManyToManyField '%s', "
 </s> add                             "The value of '%s' cannot include the many-to-many field '%s' " </s> remove                 "not a ForeignKey or ManyToManyField.",
 </s> add                 "not a foreign key or a many-to-many field.", </s> remove                 if (isinstance(field, models.ManyToManyField) and
                        not field.remote_field.through._meta.auto_created):
 </s> add                 if field.many_to_many and not field.remote_field.through._meta.auto_created: </s> remove   ``ManyToManyField`` ``<field name>``, because that field manually specifies a
 </s> add   many-to-many field ``<field name>``, because that field manually specifies a
                "The value of 'fieldsets[1][1][\"fields\"]' cannot include the many-to-many field "
                "'authors' because that field manually specifies a relationship model.",
  
          errors = FieldsetBookAdmin(Book, AdminSite()).check()
          expected = [
              checks.Error(
                "The value of 'fieldsets[1][1][\"fields\"]' cannot include the many-to-many field "
                "'authors' because that field manually specifies a relationship model.",
                "The value of 'fieldsets[1][1][\"fields\"]' cannot include the many-to-many field "
                "'authors' because that field manually specifies a relationship model.",
                  obj=FieldsetBookAdmin,
                  id='admin.E013',
              )
          ]
          self.assertEqual(errors, expected)
keep keep keep keep replace 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/admin_checks/tests.py