[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools/tests - test_config.py:1.4

Fred L. Drake, Jr. fred at zope.com
Tue Mar 16 11:08:08 EST 2004


Update of /cvs-repository/Packages/zpkgtools/zpkgtools/tests
In directory cvs.zope.org:/tmp/cvs-serv7476

Modified Files:
	test_config.py 
Log Message:
update to reflect changes in the Configuration object API


=== Packages/zpkgtools/zpkgtools/tests/test_config.py 1.3 => 1.4 ===
--- Packages/zpkgtools/zpkgtools/tests/test_config.py:1.3	Thu Mar 11 09:55:51 2004
+++ Packages/zpkgtools/zpkgtools/tests/test_config.py	Tue Mar 16 11:08:07 2004
@@ -33,7 +33,8 @@
 
     def test_constructor(self):
         path = os.path.join(here, "zpkg-ok.conf")
-        cf = config.Configuration(path)
+        cf = config.Configuration()
+        cf.loadPath(path)
         self.assertEqual(
             cf.location_maps,
             ["cvs://cvs.example.org/cvsroot:module/package/PACKAGES.txt",
@@ -42,17 +43,20 @@
     def test_constructor_bad_config_setting(self):
         # unknown option:
         path = os.path.join(here, "zpkg-error-1.conf")
+        cf = config.Configuration()
         self.assertRaises(cfgparser.ConfigurationError,
-                          config.Configuration, path)
+                          cf.loadPath, path)
 
         # repository-map without path
         path = os.path.join(here, "zpkg-error-2.conf")
+        cf = config.Configuration()
         self.assertRaises(cfgparser.ConfigurationError,
-                          config.Configuration, path)
+                          cf.loadPath, path)
 
     def test_constructor_no_such_file(self):
         path = os.path.join(here, "no-such-file")
-        self.assertRaises(IOError, config.Configuration, path)
+        cf = config.Configuration()
+        self.assertRaises(IOError, cf.loadPath, path)
 
 
 def test_suite():




More information about the Zope-CVS mailing list