Mercurial > p > roundup > code
diff test/test_config.py @ 6325:1a15089c2e49 issue2550923_computed_property
Merge trunk into branch
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 06 Feb 2021 20:15:26 -0500 |
| parents | 6cf9f2f49b89 |
| children | c547e05d7a54 |
line wrap: on
line diff
--- a/test/test_config.py Fri Jan 15 16:34:30 2021 -0500 +++ b/test/test_config.py Sat Feb 06 20:15:26 2021 -0500 @@ -112,13 +112,23 @@ config._get_option('TIMEZONE').set("UTC")) self.assertEqual(None, config._get_option('TIMEZONE').set("America/New_York")) + self.assertEqual(None, + config._get_option('TIMEZONE').set("EST")) + self.assertRaises(configuration.OptionValueError, + config._get_option('TIMEZONE').set, "Zool/Zot") except ImportError: - self.assertRaises(configuration.OptionValueError, - config._get_option('TIMEZONE').set, "UTC") + # UTC is a known offset of 0 coded into roundup.date + # so it works even without pytz. + self.assertEqual(None, + config._get_option('TIMEZONE').set("UTC")) + # same with EST known timeone offset of 5 + self.assertEqual(None, + config._get_option('TIMEZONE').set("EST")) self.assertRaises(configuration.OptionValueError, config._get_option('TIMEZONE').set, "America/New_York") + def testWebSecretKey(self): config = configuration.CoreConfig()
