summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2016-09-15 11:54:22 -0400
committerTim Graham <timograham@gmail.com>2016-09-16 10:24:47 -0400
commit16202863facc8629a7422cf74cd3df30142d3aaf (patch)
tree73ac08bb6a7bc3e4373c0f18d66a88668e066282 /tests/admin_scripts/tests.py
parent43c471e81c27542e4dc392dfa2310c5a52db35d9 (diff)
Refs #27025 -- Fixed tests for the new ModuleNotFoundError in Python 3.6.
http://bugs.python.org/issue15767
Diffstat (limited to 'tests/admin_scripts/tests.py')
-rw-r--r--tests/admin_scripts/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 5ac24db6ea..567a8f14f8 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -34,6 +34,7 @@ from django.utils.six import PY2, PY3, StringIO
custom_templates_dir = os.path.join(os.path.dirname(upath(__file__)), 'custom_templates')
+PY36 = sys.version_info >= (3, 6)
SYSTEM_CHECK_MSG = 'System check identified no issues'
@@ -1166,7 +1167,7 @@ class ManageCheck(AdminScriptTestCase):
args = ['check']
out, err = self.run_manage(args)
self.assertNoOutput(out)
- self.assertOutput(err, 'ImportError')
+ self.assertOutput(err, 'ModuleNotFoundError' if PY36 else 'ImportError')
self.assertOutput(err, 'No module named')
self.assertOutput(err, 'admin_scriptz')