[CMF-checkins] CVS: CMF/CMFSetup/tests - test_toolset.py:1.2
Tres Seaver
tseaver at zope.com
Tue Jun 29 17:50:01 EDT 2004
Update of /cvs-repository/CMF/CMFSetup/tests
In directory cvs.zope.org:/tmp/cvs-serv15537/tests
Modified Files:
test_toolset.py
Log Message:
- Add tooset export.
=== CMF/CMFSetup/tests/test_toolset.py 1.1 => 1.2 ===
--- CMF/CMFSetup/tests/test_toolset.py:1.1 Fri Jun 25 16:21:57 2004
+++ CMF/CMFSetup/tests/test_toolset.py Tue Jun 29 17:49:31 2004
@@ -33,7 +33,7 @@
from Products.CMFSetup.toolset import ToolInitializer
return ToolInitializer
- def _initSite( self, foo=2, bar=2 ):
+ def _initSite( self ):
self.root.site = Folder( id='site' )
site = self.root.site
@@ -140,9 +140,27 @@
, 'a.name'
)
+ def test_generateXML_empty( self ):
+
+ site = self._initSite()
+ configurator = self._makeOne( site ).__of__( site )
+
+ self._compareDOM( configurator.generateXML(), _EMPTY_IMPORT_XML )
+
+ def test_generateXML_normal( self ):
+
+ site = self._initSite()
+ configurator = self._makeOne( site ).__of__( site )
+
+ configurator.addForbiddenTool( 'doomed' )
+ configurator.addRequiredTool( 'mandatory', 'path.to.one' )
+ configurator.addRequiredTool( 'obligatory', 'path.to.another' )
+
+ configurator.parseXML( _NORMAL_IMPORT_XML )
+
def test_parseXML_empty( self ):
- site = self._initSite( 0, 0 )
+ site = self._initSite()
configurator = self._makeOne( site )
configurator.parseXML( _EMPTY_IMPORT_XML )
@@ -152,7 +170,7 @@
def test_parseXML_normal( self ):
- site = self._initSite( 0, 0 )
+ site = self._initSite()
configurator = self._makeOne( site )
configurator.parseXML( _NORMAL_IMPORT_XML )
@@ -172,7 +190,7 @@
def test_parseXML_confused( self ):
- site = self._initSite( 0, 0 )
+ site = self._initSite()
configurator = self._makeOne( site )
self.assertRaises( ValueError
More information about the CMF-checkins
mailing list