Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.6.x] Further hardening. Refs #18766.

Backport of c687bf0 from master.
  • Loading branch information...
commit b085e7c3033d49e4d7525bacb1f34340730918a8 1 parent 0035a0c
Aymeric Augustin authored September 08, 2013

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. 4  tests/utils_tests/test_timezone.py
4  tests/utils_tests/test_timezone.py
@@ -25,10 +25,10 @@ def test_localtime_out_of_range(self):
25 25
         long_ago = datetime.datetime(1900, 1, 1, tzinfo=timezone.utc)
26 26
         try:
27 27
             timezone.localtime(long_ago, local_tz)
28  
-        except OverflowError as exc:
  28
+        except (OverflowError, ValueError) as exc:
29 29
             self.assertIn("install pytz", exc.args[0])
30 30
         else:
31  
-            raise unittest.SkipTest("Failed to trigger an OverflowError")
  31
+            raise unittest.SkipTest("Failed to trigger an OverflowError or ValueError")
32 32
 
33 33
     def test_now(self):
34 34
         with override_settings(USE_TZ=True):

0 notes on commit b085e7c

Please sign in to comment.
Something went wrong with that request. Please try again.