Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #14096 -- Corrected Python 2.4 syntax issue. Thanks to PaulM fo…

…r the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13579 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 597e03cd741b5c732317a5384185d70520a76cde 1 parent b3dc3a0
@freakboy3742 freakboy3742 authored
Showing with 18 additions and 18 deletions.
  1. +18 −18 django/contrib/sessions/tests.py
View
36 django/contrib/sessions/tests.py
@@ -207,32 +207,32 @@ def test_get_expire_at_browser_close(self):
# Tests get_expire_at_browser_close with different settings and different
# set_expiry calls
try:
- original_expire_at_browser_close = settings.SESSION_EXPIRE_AT_BROWSER_CLOSE
- settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = False
+ try:
+ original_expire_at_browser_close = settings.SESSION_EXPIRE_AT_BROWSER_CLOSE
+ settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = False
- self.session.set_expiry(10)
- self.assertFalse(self.session.get_expire_at_browser_close())
+ self.session.set_expiry(10)
+ self.assertFalse(self.session.get_expire_at_browser_close())
- self.session.set_expiry(0)
- self.assertTrue(self.session.get_expire_at_browser_close())
+ self.session.set_expiry(0)
+ self.assertTrue(self.session.get_expire_at_browser_close())
- self.session.set_expiry(None)
- self.assertFalse(self.session.get_expire_at_browser_close())
+ self.session.set_expiry(None)
+ self.assertFalse(self.session.get_expire_at_browser_close())
- settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = True
+ settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = True
- self.session.set_expiry(10)
- self.assertFalse(self.session.get_expire_at_browser_close())
+ self.session.set_expiry(10)
+ self.assertFalse(self.session.get_expire_at_browser_close())
- self.session.set_expiry(0)
- self.assertTrue(self.session.get_expire_at_browser_close())
+ self.session.set_expiry(0)
+ self.assertTrue(self.session.get_expire_at_browser_close())
- self.session.set_expiry(None)
- self.assertTrue(self.session.get_expire_at_browser_close())
-
- except:
- raise
+ self.session.set_expiry(None)
+ self.assertTrue(self.session.get_expire_at_browser_close())
+ except:
+ raise
finally:
settings.SESSION_EXPIRE_AT_BROWSER_CLOSE = original_expire_at_browser_close
Please sign in to comment.
Something went wrong with that request. Please try again.