diff options
| author | Claude Paroz <claude@2xlibre.net> | 2015-01-08 16:58:23 +0100 |
|---|---|---|
| committer | Markus Holtermann <info@markusholtermann.eu> | 2015-01-16 20:21:34 +0100 |
| commit | b4ac23290772e0c11379eb2dfb81c750b7052b66 (patch) | |
| tree | 9dcb8c6c65589f9074b11547ba6529d9f273f46c /tests/contenttypes_tests/tests.py | |
| parent | 374c2419e5adef53a643bf69c4753a6bf0c78a98 (diff) | |
Fixed #24099 -- Removed contenttype.name deprecated field
This finsishes the work started on #16803.
Thanks Simon Charette, Tim Graham and Collin Anderson for the
reviews.
Diffstat (limited to 'tests/contenttypes_tests/tests.py')
| -rw-r--r-- | tests/contenttypes_tests/tests.py | 6 |
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): |
