diff options
Diffstat (limited to 'tests/contenttypes_tests')
| -rw-r--r-- | tests/contenttypes_tests/tests.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/contenttypes_tests/tests.py b/tests/contenttypes_tests/tests.py index eecdaa91da..794b1e34ef 100644 --- a/tests/contenttypes_tests/tests.py +++ b/tests/contenttypes_tests/tests.py @@ -16,7 +16,6 @@ from django.test import ( SimpleTestCase, TestCase, TransactionTestCase, override_settings, ) from django.test.utils import captured_stdout, isolate_apps -from django.utils.encoding import force_text from .models import ( Article, Author, ModelWithNullFKToSite, Post, SchemeIncludedURL, @@ -134,7 +133,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(force_text(ct), 'modelcreatedonthefly') + self.assertEqual(str(ct), 'modelcreatedonthefly') @override_settings(SILENCED_SYSTEM_CHECKS=['fields.W342']) # ForeignKey(unique=True) @@ -144,9 +143,7 @@ class GenericForeignKeyTests(SimpleTestCase): def test_str(self): class Model(models.Model): field = GenericForeignKey() - expected = "contenttypes_tests.Model.field" - actual = force_text(Model.field) - self.assertEqual(expected, actual) + self.assertEqual(str(Model.field), "contenttypes_tests.Model.field") def test_missing_content_type_field(self): class TaggedItem(models.Model): |
