[Zope-Checkins] CVS: Zope/lib/python/ZServer/tests - test_config.py:1.5

Tim Peters tim.one at comcast.net
Fri Feb 20 23:50:44 EST 2004


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

Modified Files:
	test_config.py 
Log Message:
test_fcgi_factory:  Moved the failure on Windows from the bogus

        self.assertEqual(factory.host, '')

test to something else failing in

        self.check_prepare(factory)

The failure now is check_prepare's

   self.assertEqual(factory.host, "127.0.0.1")

factory.host is actually 'localhost' on Windows, but I don't understand
this test so am stopping now (and it still fails on Windows).


=== Zope/lib/python/ZServer/tests/test_config.py 1.4 => 1.5 ===
--- Zope/lib/python/ZServer/tests/test_config.py:1.4	Thu Oct  2 16:38:29 2003
+++ Zope/lib/python/ZServer/tests/test_config.py	Fri Feb 20 23:50:43 2004
@@ -25,6 +25,13 @@
 
 TEMPFILENAME = tempfile.mktemp()
 
+# For address kinds of values that don't specify a hostname, ZConfig
+# supplies a platform-dependent default.
+import sys
+DEFAULT_HOSTNAME = ''
+if sys.platform in ['win32',]:
+    DEFAULT_HOSTNAME = 'localhost'
+del sys
 
 class BaseTest(unittest.TestCase):
     schema = None
@@ -135,7 +142,7 @@
             """)
         self.assert_(isinstance(factory,
                                 ZServer.datatypes.FCGIServerFactory))
-        self.assertEqual(factory.host, '')
+        self.assertEqual(factory.host, DEFAULT_HOSTNAME)
         self.assertEqual(factory.port, 83)
         self.assertEqual(factory.path, None)
         self.check_prepare(factory)




More information about the Zope-Checkins mailing list