Fixed #21992: Skipped test when pytz is missing.

The test fails on Windows when pytz is not installed.
This commit is contained in:
Adam Avramov 2014-02-09 16:36:08 +00:00 committed by Tim Graham
parent 12385a5f86
commit 651a6f76f3
1 changed files with 1 additions and 2 deletions

View File

@ -162,8 +162,7 @@ class HumanizeTests(TestCase):
# As 24h of difference they will never be the same # As 24h of difference they will never be the same
self.assertNotEqual(naturalday_one, naturalday_two) self.assertNotEqual(naturalday_one, naturalday_two)
@skipIf(settings.TIME_ZONE != "America/Chicago" and pytz is None, @skipIf(pytz is None, "this test requires pytz")
"this test requires pytz when a non-default time zone is set")
def test_naturalday_uses_localtime(self): def test_naturalday_uses_localtime(self):
# Regression for #18504 # Regression for #18504
# This is 2012-03-08HT19:30:00-06:00 in America/Chicago # This is 2012-03-08HT19:30:00-06:00 in America/Chicago