Commit b085e7c3 authored by Aymeric Augustin's avatar Aymeric Augustin
Browse files

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

Backport of c687bf06 from master.
parent 0035a0ce
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -25,10 +25,10 @@ class TimezoneTests(unittest.TestCase):
        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):