Commit 63143d5d authored by Karen Tracey's avatar Karen Tracey
Browse files

Fixed the test added for #9005 to use the e.args[0] instead of e.message....

Fixed the test added for #9005 to use the e.args[0] instead of e.message. Exceptions didn't have 'message' before Python 2.5, and it was deprecated as of Python 2.6. args[0] works without error or DeprecationWarning from Python 2.3 through 2.6.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@10394 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent 48e01d2b
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -170,7 +170,7 @@ class Templates(unittest.TestCase):
        except TemplateSyntaxError, e:
            # Assert that we are getting the template syntax error and not the
            # string encoding error.
            self.assertEquals(e.message, "Caught an exception while rendering: Reverse for 'will_not_match' with arguments '()' and keyword arguments '{}' not found.")
            self.assertEquals(e.args[0], "Caught an exception while rendering: Reverse for 'will_not_match' with arguments '()' and keyword arguments '{}' not found.")

        settings.SETTINGS_MODULE = old_settings_module
        settings.TEMPLATE_DEBUG = old_template_debug