summaryrefslogtreecommitdiff
path: root/tests/m2m_and_m2o
diff options
context:
space:
mode:
authorVytis Banaitis <vytis.banaitis@gmail.com>2017-01-20 23:04:05 +0200
committerTim Graham <timograham@gmail.com>2017-01-26 08:19:27 -0500
commitd1bab24e0144d14513a1411503c95ececb425188 (patch)
tree187452bf7b66a9600abc47570ccae22e6d539ede /tests/m2m_and_m2o
parent888c1e9bfe49135d049cbdcbbb0f2e97a1a0a1f5 (diff)
downloaddjango-d1bab24e0144d14513a1411503c95ececb425188.tar.gz
Refs #23919, #27778 -- Removed obsolete mentions of unicode.
Diffstat (limited to 'tests/m2m_and_m2o')
-rw-r--r--tests/m2m_and_m2o/models.py4
-rw-r--r--tests/m2m_and_m2o/tests.py8
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/m2m_and_m2o/models.py b/tests/m2m_and_m2o/models.py
index d9da2bf534..9e3cf7c1da 100644
--- a/tests/m2m_and_m2o/models.py
+++ b/tests/m2m_and_m2o/models.py
@@ -22,5 +22,5 @@ class Issue(models.Model):
ordering = ('num',)
-class UnicodeReferenceModel(models.Model):
- others = models.ManyToManyField("UnicodeReferenceModel")
+class StringReferenceModel(models.Model):
+ others = models.ManyToManyField('StringReferenceModel')
diff --git a/tests/m2m_and_m2o/tests.py b/tests/m2m_and_m2o/tests.py
index 2c84a7f2d4..aa5daa9d1d 100644
--- a/tests/m2m_and_m2o/tests.py
+++ b/tests/m2m_and_m2o/tests.py
@@ -1,7 +1,7 @@
from django.db.models import Q
from django.test import TestCase
-from .models import Issue, UnicodeReferenceModel, User
+from .models import Issue, StringReferenceModel, User
class RelatedObjectTests(TestCase):
@@ -84,11 +84,11 @@ class RelatedObjectTests(TestCase):
class RelatedObjectUnicodeTests(TestCase):
def test_m2m_with_unicode_reference(self):
"""
- Regression test for #6045: references to other models can be unicode
+ Regression test for #6045: references to other models can be
strings, providing they are directly convertible to ASCII.
"""
- m1 = UnicodeReferenceModel.objects.create()
- m2 = UnicodeReferenceModel.objects.create()
+ m1 = StringReferenceModel.objects.create()
+ m2 = StringReferenceModel.objects.create()
m2.others.add(m1) # used to cause an error (see ticket #6045)
m2.save()
list(m2.others.all()) # Force retrieval.