def test_m2m_with_unicode_reference(self):
        m1 = UnicodeReferenceModel.objects.create()
        m2 = UnicodeReferenceModel.objects.create()
        m2.others.add(m1)  # used to cause an error (see ticket #6045)
        m2.save()
        list(m2.others.all())  # Force retrieval.
Regression test for #6045: references to other models can be unicode
dataset/ETHPy150Open django/django/tests/m2m_and_m2o/tests.py/RelatedObjectUnicodeTests.test_m2m_with_unicode_reference