Refs #23919 -- Removed unneeded str() calls

This commit is contained in:
Claude Paroz 2017-01-20 10:20:53 +01:00
parent 4e729feaa6
commit 042b7350a0
47 changed files with 116 additions and 164 deletions

View file

@ -145,14 +145,13 @@ class AdminScriptTestCase(unittest.TestCase):
# Set the test environment
if settings_file:
test_environ['DJANGO_SETTINGS_MODULE'] = str(settings_file)
test_environ['DJANGO_SETTINGS_MODULE'] = settings_file
elif 'DJANGO_SETTINGS_MODULE' in test_environ:
del test_environ['DJANGO_SETTINGS_MODULE']
python_path = [base_dir, django_dir, tests_dir]
python_path.extend(ext_backend_base_dirs)
# Use native strings for better compatibility
test_environ[str(python_path_var_name)] = os.pathsep.join(python_path)
test_environ[str('PYTHONWARNINGS')] = str('')
test_environ[python_path_var_name] = os.pathsep.join(python_path)
test_environ['PYTHONWARNINGS'] = ''
# Move to the test directory and run
os.chdir(self.test_dir)