Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Further hardening. Refs #18766.

  • Loading branch information...
commit c687bf0620d67e0579302515904ffe169581d036 1 parent 1a1e147
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
@@ -26,10 +26,10 @@ def test_localtime_out_of_range(self):
26 26
         long_ago = datetime.datetime(1900, 1, 1, tzinfo=timezone.utc)
27 27
         try:
28 28
             timezone.localtime(long_ago, local_tz)
29  
-        except OverflowError as exc:
  29
+        except (OverflowError, ValueError) as exc:
30 30
             self.assertIn("install pytz", exc.args[0])
31 31
         else:
32  
-            raise unittest.SkipTest("Failed to trigger an OverflowError")
  32
+            raise unittest.SkipTest("Failed to trigger an OverflowError or ValueError")
33 33
 
34 34
     def test_now(self):
35 35
         with override_settings(USE_TZ=True):

0 notes on commit c687bf0

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