diff options
| author | Tim Graham <timograham@gmail.com> | 2016-09-15 11:54:22 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-09-16 10:24:47 -0400 |
| commit | 16202863facc8629a7422cf74cd3df30142d3aaf (patch) | |
| tree | 73ac08bb6a7bc3e4373c0f18d66a88668e066282 /tests/view_tests | |
| parent | 43c471e81c27542e4dc392dfa2310c5a52db35d9 (diff) | |
Refs #27025 -- Fixed tests for the new ModuleNotFoundError in Python 3.6.
http://bugs.python.org/issue15767
Diffstat (limited to 'tests/view_tests')
| -rw-r--r-- | tests/view_tests/tests/test_debug.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index 7a450306f5..ba6e6defee 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -36,6 +36,8 @@ from ..views import ( if six.PY3: from .py3_test_debug import Py3ExceptionReporterTests # NOQA +PY36 = sys.version_info >= (3, 6) + class User(object): def __str__(self): @@ -430,7 +432,7 @@ class ExceptionReporterTests(SimpleTestCase): exc_type, exc_value, tb = sys.exc_info() reporter = ExceptionReporter(request, exc_type, exc_value, tb) html = reporter.get_traceback_html() - self.assertIn('<h1>ImportError at /test_view/</h1>', html) + self.assertIn('<h1>%sError at /test_view/</h1>' % 'ModuleNotFound' if PY36 else 'Import', html) def test_ignore_traceback_evaluation_exceptions(self): """ |
