[Zope-Checkins] CVS: Zope/lib/python/ZServer/tests -
test_config.py:1.10
Tim Peters
tim.one at comcast.net
Mon Apr 26 14:30:43 EDT 2004
Update of /cvs-repository/Zope/lib/python/ZServer/tests
In directory cvs.zope.org:/tmp/cvs-serv12236/lib/python/ZServer/tests
Modified Files:
test_config.py
Log Message:
BaseTest.check_prepare(): the default hostname on Windows isn't an
empty string, so check_prepare() can't expect factory.prepare() to
change the host on Windows. This repairs Windows failures in
test_fcgi_factory
test_ftp_factory
test_http_factory
test_icp_factory
test_webdav_source_factory
test_monitor_factory_with_emergency_user
test_monitor_factory_without_emergency_user
Unfortunately, it also exposes 2 new Windows failures in
test_http_factory
test_webdav_source_factory
=== Zope/lib/python/ZServer/tests/test_config.py 1.9 => 1.10 ===
--- Zope/lib/python/ZServer/tests/test_config.py:1.9 Fri Feb 20 23:58:03 2004
+++ Zope/lib/python/ZServer/tests/test_config.py Mon Apr 26 14:30:42 2004
@@ -57,6 +57,10 @@
return conf.servers[0]
def check_prepare(self, factory):
+ # On Linux the default hostname is an empty string, but on Windows
+ # it's "localhost". So factory.prepare() will replace factory.host
+ # with "127.0.0.1" only on non-Windows boxes.
+ expected_factory_host = factory.host or "127.0.0.1"
port = factory.port
o = object()
factory.prepare("127.0.0.1", o, "module",
@@ -68,7 +72,7 @@
self.assert_(factory.host is None)
self.assert_(factory.port is None)
else:
- self.assertEqual(factory.host, "127.0.0.1")
+ self.assertEqual(factory.host, expected_factory_host)
self.assertEqual(factory.port, 9300 + port)
More information about the Zope-Checkins
mailing list