Mercurial > p > roundup > code
comparison test/test_config.py @ 5770:f91da208f26b
Validate that TRACKER_WEB url starts with https:// or http:// and ends
with a /.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 05 Jun 2019 21:11:50 -0400 |
| parents | dd642afb4440 |
| children | 8dbe307bdb57 |
comparison
equal
deleted
inserted
replaced
| 5769:9cc3257d0f43 | 5770:f91da208f26b |
|---|---|
| 48 | 48 |
| 49 def test_validConfigKeyword(self): | 49 def test_validConfigKeyword(self): |
| 50 """Run configure tests looking for invalid option name | 50 """Run configure tests looking for invalid option name |
| 51 """ | 51 """ |
| 52 self.assertEquals(config._get_option("FOO"), "value") | 52 self.assertEquals(config._get_option("FOO"), "value") |
| 53 | |
| 54 def testTrackerWeb(self): | |
| 55 config = configuration.CoreConfig() | |
| 56 | |
| 57 self.assertEqual(None, | |
| 58 config._get_option('TRACKER_WEB').set("http://foo.example/bar/")) | |
| 59 self.assertEqual(None, | |
| 60 config._get_option('TRACKER_WEB').set("https://foo.example/bar/")) | |
| 61 | |
| 62 self.assertRaises(configuration.OptionValueError, | |
| 63 config._get_option('TRACKER_WEB').set, "https://foo.example/bar") | |
| 64 | |
| 65 self.assertRaises(configuration.OptionValueError, | |
| 66 config._get_option('TRACKER_WEB').set, "htt://foo.example/bar/") | |
| 67 | |
| 68 self.assertRaises(configuration.OptionValueError, | |
| 69 config._get_option('TRACKER_WEB').set, "htt://foo.example/bar") | |
| 70 |
