[Zodb-checkins] CVS: ZODB3/zLOG/tests - testzLogConfig.py:1.9

Fred L. Drake, Jr. fred@zope.com
Thu, 23 Jan 2003 15:17:25 -0500


Update of /cvs-repository/ZODB3/zLOG/tests
In directory cvs.zope.org:/tmp/cvs-serv7829

Modified Files:
	testzLogConfig.py 
Log Message:
Update the logging level names in the test, and make sure we get the
same results regardless of case.


=== ZODB3/zLOG/tests/testzLogConfig.py 1.8 => 1.9 ===
--- ZODB3/zLOG/tests/testzLogConfig.py:1.8	Thu Jan 23 14:58:38 2003
+++ ZODB3/zLOG/tests/testzLogConfig.py	Thu Jan 23 15:17:22 2003
@@ -51,14 +51,12 @@
     def test_logging_level(self):
         # Make sure the expected names are supported; it's not clear
         # how to check the values in a meaningful way.
+        # Just make sure they're case-insensitive.
         convert = zLOG.datatypes.logging_level
-        convert("all")
-        convert("debug")
-        convert("info")
-        convert("warn")
-        convert("error")
-        convert("fatal")
-        convert("critical")
+        for name in ["notset", "all", "trace", "debug", "blather",
+                     "info", "warn", "warning", "error", "fatal",
+                     "critical"]:
+            self.assertEqual(convert(name), convert(name.upper()))
         self.assertRaises(ValueError, convert, "hopefully-not-a-valid-value")
 
     def test_http_method(self):