summaryrefslogtreecommitdiff
path: root/tests/contenttypes_tests/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/contenttypes_tests/tests.py')
-rw-r--r--tests/contenttypes_tests/tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/contenttypes_tests/tests.py b/tests/contenttypes_tests/tests.py
index 0e33f40c5c..be727c4a96 100644
--- a/tests/contenttypes_tests/tests.py
+++ b/tests/contenttypes_tests/tests.py
@@ -11,7 +11,7 @@ from django.core import checks
from django.db import connections, models
from django.test import TestCase, override_settings
from django.test.utils import captured_stdout
-from django.utils.encoding import force_str
+from django.utils.encoding import force_str, force_text
from .models import Author, Article, SchemeIncludedURL
@@ -87,7 +87,7 @@ class ContentTypesViewsTests(TestCase):
ct = ContentType.objects.get_for_model(ModelCreatedOnTheFly)
self.assertEqual(ct.app_label, 'my_great_app')
self.assertEqual(ct.model, 'modelcreatedonthefly')
- self.assertEqual(ct.name, 'a model created on the fly')
+ self.assertEqual(force_text(ct), 'modelcreatedonthefly')
class IsolatedModelsTestCase(TestCase):
@@ -364,7 +364,7 @@ class GenericRelationshipTests(IsolatedModelsTestCase):
class UpdateContentTypesTests(TestCase):
def setUp(self):
self.before_count = ContentType.objects.count()
- ContentType.objects.create(name='fake', app_label='contenttypes_tests', model='Fake')
+ ContentType.objects.create(app_label='contenttypes_tests', model='Fake')
self.app_config = apps.get_app_config('contenttypes_tests')
def test_interactive_true(self):