Skip to content
Browse files

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

Backport of c687bf0 from master.
  • Loading branch information...
1 parent 0035a0c commit b085e7c3033d49e4d7525bacb1f34340730918a8 @aaugustin aaugustin committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/utils_tests/
4 tests/utils_tests/
@@ -25,10 +25,10 @@ def test_localtime_out_of_range(self):
long_ago = datetime.datetime(1900, 1, 1, tzinfo=timezone.utc)
timezone.localtime(long_ago, local_tz)
- except OverflowError as exc:
+ except (OverflowError, ValueError) as exc:
self.assertIn("install pytz", exc.args[0])
- 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):

0 comments on commit b085e7c

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