Commit 4f778915 authored by Fred Drake's avatar Fred Drake

Update the logging level names in the test, and make sure we get the

same results regardless of case.
parent 8e169357
...@@ -51,14 +51,12 @@ class TestzLOGConfig(unittest.TestCase): ...@@ -51,14 +51,12 @@ class TestzLOGConfig(unittest.TestCase):
def test_logging_level(self): def test_logging_level(self):
# Make sure the expected names are supported; it's not clear # Make sure the expected names are supported; it's not clear
# how to check the values in a meaningful way. # how to check the values in a meaningful way.
# Just make sure they're case-insensitive.
convert = zLOG.datatypes.logging_level convert = zLOG.datatypes.logging_level
convert("all") for name in ["notset", "all", "trace", "debug", "blather",
convert("debug") "info", "warn", "warning", "error", "fatal",
convert("info") "critical"]:
convert("warn") self.assertEqual(convert(name), convert(name.upper()))
convert("error")
convert("fatal")
convert("critical")
self.assertRaises(ValueError, convert, "hopefully-not-a-valid-value") self.assertRaises(ValueError, convert, "hopefully-not-a-valid-value")
def test_http_method(self): def test_http_method(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment