1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #23919 -- Removed unneeded force_str calls

This commit is contained in:
Claude Paroz
2017-01-11 23:17:25 +01:00
parent bf1c957027
commit dc8834cad4
44 changed files with 100 additions and 167 deletions

View File

@@ -24,7 +24,6 @@ from django.test import SimpleTestCase, ignore_warnings, mock
from django.utils import datetime_safe
from django.utils._os import upath
from django.utils.deconstruct import deconstructible
from django.utils.encoding import force_str
from django.utils.functional import SimpleLazyObject
from django.utils.timezone import FixedOffset, get_default_timezone, utc
from django.utils.translation import ugettext_lazy as _
@@ -170,7 +169,7 @@ class WriterTests(SimpleTestCase):
def safe_exec(self, string, value=None):
d = {}
try:
exec(force_str(string), globals(), d)
exec(string, globals(), d)
except Exception as e:
if value:
self.fail("Could not exec %r (from value %r): %s" % (string.strip(), value, e))