Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

Backport of c687bf0 from master.
  • Loading branch information...
commit b085e7c3033d49e4d7525bacb1f34340730918a8 1 parent 0035a0c
@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
@@ -25,10 +25,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.