summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py20
1 files changed, 6 insertions, 14 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 08fe645535..e37e8a4256 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -27,7 +27,7 @@ from django.test import (
)
from django.utils._os import npath, upath
from django.utils.encoding import force_text
-from django.utils.six import PY2, StringIO
+from django.utils.six import StringIO
custom_templates_dir = os.path.join(os.path.dirname(upath(__file__)), 'custom_templates')
@@ -626,7 +626,6 @@ class DjangoAdminSettingsDirectory(AdminScriptTestCase):
self.assertTrue(os.path.exists(app_path))
self.assertTrue(os.path.exists(os.path.join(app_path, 'api.py')))
- @unittest.skipIf(PY2, "Python 2 doesn't support Unicode package names.")
def test_startapp_unicode_name(self):
"directory: startapp creates the correct directory with unicode characters"
args = ['startapp', 'こんにちは']
@@ -1897,18 +1896,11 @@ class StartProject(LiveServerTestCase, AdminScriptTestCase):
self.addCleanup(shutil.rmtree, testproject_dir, True)
out, err = self.run_django_admin(args)
- if PY2:
- self.assertOutput(
- err,
- "Error: '%s' is not a valid project name. Please make "
- "sure the name begins with a letter or underscore." % bad_name
- )
- else:
- self.assertOutput(
- err,
- "Error: '%s' is not a valid project name. Please make "
- "sure the name is a valid identifier." % bad_name
- )
+ self.assertOutput(
+ err,
+ "Error: '%s' is not a valid project name. Please make "
+ "sure the name is a valid identifier." % bad_name
+ )
self.assertFalse(os.path.exists(testproject_dir))
def test_simple_project_different_directory(self):