Code

Adjust to interface change in pytz.
authorstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 10 Mar 2009 21:01:20 +0000 (21:01 +0000)
committerstefan <stefan@57a73879-2fb5-44c3-a270-3262357dd7e2>
Tue, 10 Mar 2009 21:01:20 +0000 (21:01 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4179 57a73879-2fb5-44c3-a270-3262357dd7e2

test/test_userauditor.py

index d098280cf5612e388d4ddfd3a2aef1f9caa52b4b..acd4f77a009e9b782fd34c0c68733ff8f6c87a44 100644 (file)
@@ -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')