

def test_m2m_tables_in_subpackage_models(self):
    '\n        Regression for #12168: models split into subpackages still get M2M\n        tables.\n        '
    p = Publication.objects.create(title='FooBar')
    site = Site.objects.create(name='example.com')
    a = Article.objects.create(headline='a foo headline')
    a.publications.add(p)
    a.sites.add(site)
    a = Article.objects.get(id=a.pk)
    self.assertEqual(a.id, a.pk)
    self.assertEqual(a.sites.count(), 1)

dataset/ETHPy150Open django/django/tests/model_package/tests.py ModelPackageTests.test_m2m_tables_in_subpackage_models/original