[Zope3-checkins] CVS: Zope3/src/zodb/zeo/tests - test_options.py:1.3

Fred L. Drake, Jr. fred at zope.com
Fri Feb 6 09:51:42 EST 2004


Update of /cvs-repository/Zope3/src/zodb/zeo/tests
In directory cvs.zope.org:/tmp/cvs-serv30373

Modified Files:
	test_options.py 
Log Message:
remove assumption about the default hostname returned by ZConfig now
that ZConfig can return different defaults depending on platform


=== Zope3/src/zodb/zeo/tests/test_options.py 1.2 => 1.3 ===
--- Zope3/src/zodb/zeo/tests/test_options.py:1.2	Thu Jun 19 17:41:07 2003
+++ Zope3/src/zodb/zeo/tests/test_options.py	Fri Feb  6 09:51:41 2004
@@ -25,6 +25,9 @@
 from zodb.zeo.runzeo import ZEOOptions
 from zdaemon.tests.testzdoptions import TestZDOptions
 
+from ZConfig import datatypes
+
+
 class TestZEOOptions(TestZDOptions):
 
     OptionsClass = ZEOOptions
@@ -61,7 +64,7 @@
     def test_defaults_with_schema(self):
         options = self.OptionsClass()
         options.realize(["-C", self.tempfilename])
-        self.assertEqual(options.address, ("", 5555))
+        self.assertEqual(options.address, (datatypes.DEFAULT_HOST, 5555))
         self.assertEqual(len(options.storages), 1)
         opener = options.storages[0]
         self.assertEqual(opener.name, "fs")
@@ -73,7 +76,7 @@
     def test_defaults_without_schema(self):
         options = self.OptionsClass()
         options.realize(["-a", "5555", "-f", "Data.fs"])
-        self.assertEqual(options.address, ("", 5555))
+        self.assertEqual(options.address, (datatypes.DEFAULT_HOST, 5555))
         self.assertEqual(len(options.storages), 1)
         opener = options.storages[0]
         self.assertEqual(opener.name, "1")
@@ -87,7 +90,7 @@
         options = self.OptionsClass()
         options.realize(["-C", self.tempfilename,
                          "-a", "6666", "-f", "Wisdom.fs"])
-        self.assertEqual(options.address, ("", 6666))
+        self.assertEqual(options.address, (datatypes.DEFAULT_HOST, 6666))
         self.assertEqual(len(options.storages), 1)
         opener = options.storages[0]
         self.assertEqual(opener.__class__, zodb.config.FileStorage)




More information about the Zope3-Checkins mailing list