From a7e6e07a193dc636305fe29b683a2403d1d0b7ec Mon Sep 17 00:00:00 2001 From: stefan Date: Tue, 10 Mar 2009 21:01:20 +0000 Subject: [PATCH] Adjust to interface change in pytz. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4179 57a73879-2fb5-44c3-a270-3262357dd7e2 --- test/test_userauditor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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') -- 2.30.2