def test_natural_manager(self):
        test = M2mModelWithKey.objects.create()
        obj = M2mAnother.objects.create()
        obj.m2m.add(test)  # this would fail if NaturalManager could not be instantiated
        self.assertEqual(test.pk, obj.m2m.get_by_natural_key(1).pk)
Test if natural manager can be instantiated when using M2M.
dataset/ETHPy150Open zlorf/django-synchro/synchro/tests.py/M2MSynchroTests.test_natural_manager