[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup/tests - test_schema.py:1.2.2.5

Fred L. Drake, Jr. fred@zope.com
Tue, 18 Mar 2003 14:54:59 -0500


Update of /cvs-repository/Zope/lib/python/Zope/Startup/tests
In directory cvs.zope.org:/tmp/cvs-serv12517

Modified Files:
      Tag: new-install-branch
	test_schema.py 
Log Message:
- add a simple test of the dns-server key
- add a sanity check to the config-loading helper


=== Zope/lib/python/Zope/Startup/tests/test_schema.py 1.2.2.4 => 1.2.2.5 ===
--- Zope/lib/python/Zope/Startup/tests/test_schema.py:1.2.2.4	Tue Mar 18 14:32:21 2003
+++ Zope/lib/python/Zope/Startup/tests/test_schema.py	Tue Mar 18 14:54:58 2003
@@ -44,6 +44,7 @@
             conf, handler = ZConfig.loadConfigFile(schema, sio)
         finally:
             os.rmdir(TEMPNAME)
+        self.assertEqual(conf.instancehome, TEMPNAME)
         return conf
 
     def test_load_config_template(self):
@@ -82,6 +83,14 @@
         self.assertEqual(conf.access.name, "access")
         self.assertEqual(conf.access.handler_factories[0].section.path, fn)
         self.assert_(conf.trace is None)
+
+    def test_dns_resolver(self):
+        from ZServer.medusa import resolver
+        conf = self.load_config_text("""\
+            instancehome <<INSTANCE_HOME>>
+            dns-server localhost
+            """)
+        self.assert_(isinstance(conf.dns_resolver, resolver.caching_resolver))
 
 
 def test_suite():