Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
GenericSetup.tests.test_tool.Test_exportToolset Class Reference
Inheritance diagram for GenericSetup.tests.test_tool.Test_exportToolset:
Inheritance graph
[legend]
Collaboration diagram for GenericSetup.tests.test_tool.Test_exportToolset:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_empty
def test_normal

Static Public Attributes

 layer = ExportImportZCMLLayer

Detailed Description

Definition at line 1110 of file test_tool.py.


Member Function Documentation

Definition at line 1114 of file test_tool.py.

01114 
01115     def test_empty( self ):
01116 
01117         from Products.GenericSetup.tool import TOOLSET_XML
01118         from Products.GenericSetup.tool import exportToolset
01119 
01120         site = self._initSite()
01121         context = DummyExportContext( site, tool=site.setup_tool )
01122 
01123         exportToolset( context )
01124 
01125         self.assertEqual( len( context._wrote ), 1 )
01126         filename, text, content_type = context._wrote[ 0 ]
01127         self.assertEqual( filename, TOOLSET_XML )
01128         self._compareDOM( text, _EMPTY_TOOLSET_XML )
01129         self.assertEqual( content_type, 'text/xml' )

Here is the call graph for this function:

Definition at line 1130 of file test_tool.py.

01130 
01131     def test_normal( self ):
01132 
01133         from Products.GenericSetup.tool import TOOLSET_XML
01134         from Products.GenericSetup.tool import exportToolset
01135 
01136         site = self._initSite()
01137         toolset = site.setup_tool.getToolsetRegistry()
01138         toolset.addForbiddenTool( 'doomed' )
01139         toolset.addRequiredTool( 'mandatory', 'path.to.one' )
01140         toolset.addRequiredTool( 'obligatory', 'path.to.another' )
01141 
01142         context = DummyExportContext( site, tool=site.setup_tool )
01143 
01144         exportToolset( context )
01145 
01146         self.assertEqual( len( context._wrote ), 1 )
01147         filename, text, content_type = context._wrote[ 0 ]
01148         self.assertEqual( filename, TOOLSET_XML )
01149         self._compareDOM( text, _NORMAL_TOOLSET_XML )
01150         self.assertEqual( content_type, 'text/xml' )
01151 

Here is the call graph for this function:


Member Data Documentation

Definition at line 1112 of file test_tool.py.


The documentation for this class was generated from the following file: