diff options
| author | Claude Paroz <claude@2xlibre.net> | 2017-01-24 12:22:42 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2017-01-24 18:45:54 +0100 |
| commit | 2366100872ec17dde06abc63c1ad74dcf746b134 (patch) | |
| tree | d6b5c393f8c2c2d01bcbb2295759f14bbf3aac05 /tests/contenttypes_tests | |
| parent | 5b95d421f7ab8deadaf3c1ad3f341bdfc85bfca4 (diff) | |
Removed unneeded force_text calls in the test suite
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): |
