[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/StartUp/tests - testStartupDirectives.py:1.3

Guido van Rossum guido@python.org
Thu, 12 Dec 2002 13:35:28 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/StartUp/tests
In directory cvs.zope.org:/tmp/cvs-serv18144

Modified Files:
	testStartupDirectives.py 
Log Message:
testInitDB() needed PlacefulSetup.
Whitespace normalization.
Removed empty docstrings.


=== Zope3/lib/python/Zope/App/StartUp/tests/testStartupDirectives.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/App/StartUp/tests/testStartupDirectives.py:1.2	Tue Nov 19 18:25:14 2002
+++ Zope3/lib/python/Zope/App/StartUp/tests/testStartupDirectives.py	Thu Dec 12 13:35:27 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
 
@@ -17,9 +17,11 @@
 """
 
 import unittest, sys, tempfile, os
-from Zope.Testing.CleanUp import CleanUp # Base class w registry cleanup
+from Zope.App.OFS.Services.ServiceManager.tests.PlacefulSetup import \
+     PlacefulSetup
 from Zope.App.StartUp.metaConfigure import SiteDefinition
 from Zope.Configuration.name import resolve
+from Zope.ComponentArchitecture.GlobalAdapterService import provideAdapter
 
 _fsname = tempfile.mktemp()+'.fs'
 
@@ -29,26 +31,24 @@
         return resolve(dottedname)
 
 
-class Test(CleanUp, unittest.TestCase):
+class Test(PlacefulSetup, unittest.TestCase):
 
     def tearDown(self):
 
-        CleanUp.tearDown(self)
+        PlacefulSetup.tearDown(self)
 
         for ext in '', '.lock', '.index', '.tmp':
             try: os.remove(_fsname + ext)
             except: pass
-        
+
 
     def _createBlankSiteDefinition(self):
-        """ """
         return SiteDefinition('', 'Example Site', 4)
-    
+
 
     def testStorageMethods(self):
-        """ """
         sd = self._createBlankSiteDefinition()
-        
+
         self.assertEqual(sd.useFileStorage(ContextStub(), file=_fsname), [])
         self.assertEqual(sd._zodb._storage.__class__.__name__, 'FileStorage')
         self.assertEqual(sd._zodb._storage._file_name, _fsname)
@@ -60,8 +60,6 @@
 
 
     def testUseLog(self):
-        """ """
-
         sd = self._createBlankSiteDefinition()
 
         from zLOG.MinimalLogger import _log_dest
@@ -75,8 +73,6 @@
 
 
     def testAddServer(self):
-        """ """
-
         sd = self._createBlankSiteDefinition()
 
         from Zope.Configuration.Action import Action
@@ -92,11 +88,8 @@
 
 
     def testInitDB(self):
-        """ """
-
         sd = self._createBlankSiteDefinition()
 
-
         from Zope.App.OFS.Content.Folder.RootFolder import IRootFolder
         from Zope.App.ZopePublication.ZopePublication import ZopePublication
 
@@ -115,9 +108,8 @@
         app = root.get(ZopePublication.root_name, None)
         connection.close()
         self.failUnless(IRootFolder.isImplementedBy(app))
-        
 
-    
+
 def test_suite():
     loader=unittest.TestLoader()
     return loader.loadTestsFromTestCase(Test)