def test_automatic_m2m_column_names(self):
        self.assertEqual(
            Article.publications.through._meta.fields[1].name, 'article'
        )
        self.assertEqual(
            Article.publications.through._meta.fields[1].get_attname_column(),
            ('article_id', 'article_id')
        )
        self.assertEqual(
            Article.publications.through._meta.fields[2].name, 'publication'
        )
        self.assertEqual(
            Article.publications.through._meta.fields[2].get_attname_column(),
            ('publication_id', 'publication_id')
        )

        self.assertEqual(
            Article._meta.get_field('publications').m2m_db_table(),
            truncate_name('model_package_article_publications', connection.ops.max_name_length()),
        )

        self.assertEqual(
            Article._meta.get_field('publications').m2m_column_name(), 'article_id'
        )
        self.assertEqual(
            Article._meta.get_field('publications').m2m_reverse_name(),
            'publication_id'
        )
Regression for #12386 - field names on the autogenerated intermediate
dataset/ETHPy150Open django/django/tests/model_package/tests.py/ModelPackageTests.test_automatic_m2m_column_names