Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Further hardening. Refs #18766.

  • Loading branch information...
commit c687bf0620d67e0579302515904ffe169581d036 1 parent 1a1e147
@aaugustin aaugustin authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/utils_tests/test_timezone.py
View
4 tests/utils_tests/test_timezone.py
@@ -26,10 +26,10 @@ def test_localtime_out_of_range(self):
long_ago = datetime.datetime(1900, 1, 1, tzinfo=timezone.utc)
try:
timezone.localtime(long_ago, local_tz)
- except OverflowError as exc:
+ except (OverflowError, ValueError) as exc:
self.assertIn("install pytz", exc.args[0])
else:
- raise unittest.SkipTest("Failed to trigger an OverflowError")
+ raise unittest.SkipTest("Failed to trigger an OverflowError or ValueError")
def test_now(self):
with override_settings(USE_TZ=True):
Please sign in to comment.
Something went wrong with that request. Please try again.