[CMF-checkins] CVS: CMF/CMFSetup/tests - test_tool.py:1.4
Tres Seaver
tseaver at zope.com
Sun May 23 17:32:28 EDT 2004
Update of /cvs-repository/CMF/CMFSetup/tests
In directory cvs.zope.org:/tmp/cvs-serv27554/tests
Modified Files:
test_tool.py
Log Message:
- tool.py:
o Ensure that when running multiple steps (due to dependencies), all
run with the same context.
=== CMF/CMFSetup/tests/test_tool.py 1.3 => 1.4 ===
--- CMF/CMFSetup/tests/test_tool.py:1.3 Sun May 23 17:05:08 2004
+++ CMF/CMFSetup/tests/test_tool.py Sun May 23 17:32:28 2004
@@ -281,6 +281,21 @@
self.assertEqual( message, 'Unpurged' )
+ def test_runImportStep_consistent_context( self ):
+
+ TITLE = 'original title'
+ site = self._makeSite( TITLE )
+
+ tool = self._makeOne().__of__( site )
+
+ registry = tool.getImportStepRegistry()
+ registry.registerStep( 'purging', '1', _purgeIfRequired )
+ registry.registerStep( 'dependent', '1'
+ , _uppercaseSiteTitle, ( 'purging', ) )
+
+ message = tool.runImportStep( 'dependent', purge_old=False )
+ self.failIf( site.purged )
+
def _underscoreSiteTitle( context ):
site = context.getSite()
More information about the CMF-checkins
mailing list