From: stefan Date: Tue, 10 Mar 2009 21:01:20 +0000 (+0000) Subject: Adjust to interface change in pytz. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a7e6e07a193dc636305fe29b683a2403d1d0b7ec;p=roundup.git Adjust to interface change in pytz. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4179 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/test/test_userauditor.py b/test/test_userauditor.py index d098280..acd4f77 100644 --- a/test/test_userauditor.py +++ b/test/test_userauditor.py @@ -36,7 +36,11 @@ class UserAuditorTest(unittest.TestCase): self.assertRaises(ValueError, self.db.user.set, userid, timezone='-3000') if self.pytz: - self.assertRaises(ValueError, self.db.user.set, userid, timezone='MiddleOf/Nowhere') + try: + from pytz import UnknownTimeZoneError + except: + UnknownTimeZoneError = ValueError + self.assertRaises(UnknownTimeZoneError, self.db.user.set, userid, timezone='MiddleOf/Nowhere') def testGoodTimezones(self): self.db.user.create(username='test_user01', timezone='12')