Back to index

plone3  3.1.7
Public Member Functions
PluginRegistry.tests.test_exportimport.Test_exportPluginRegistry Class Reference
Inheritance diagram for PluginRegistry.tests.test_exportimport.Test_exportPluginRegistry:
Inheritance graph
[legend]
Collaboration diagram for PluginRegistry.tests.test_exportimport.Test_exportPluginRegistry:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_empty
def test_normal_no_plugins
def test_normal_with_plugins

Detailed Description

Definition at line 182 of file test_exportimport.py.


Member Function Documentation

Definition at line 184 of file test_exportimport.py.

00184 
00185         def test_empty(self):
00186             from Products.PluginRegistry.exportimport \
00187                 import exportPluginRegistry
00188             ztapi.provideAdapter(None, ITraversable, AttrItemTraverser)
00189 
00190             app, registry = self._initRegistry()
00191             context = DummyExportContext(app)
00192             exportPluginRegistry(context)
00193 
00194             self.assertEqual( len(context._wrote), 1 )
00195             filename, text, content_type = context._wrote[0]
00196             self.assertEqual(filename, 'pluginregistry.xml')
00197             self._compareDOM(text, _EMPTY_PLUGINREGISTRY_EXPORT)
00198             self.assertEqual(content_type, 'text/xml')

Here is the call graph for this function:

Definition at line 199 of file test_exportimport.py.

00199 
00200         def test_normal_no_plugins(self):
00201             from Products.PluginRegistry.exportimport \
00202                 import exportPluginRegistry
00203             ztapi.provideAdapter(None, ITraversable, AttrItemTraverser)
00204 
00205             app, registry = self._initRegistry(
00206                                     plugin_type_info=_PLUGIN_TYPE_INFO)
00207             context = DummyExportContext(app)
00208             exportPluginRegistry(context)
00209 
00210             self.assertEqual( len(context._wrote), 1 )
00211             filename, text, content_type = context._wrote[0]
00212             self.assertEqual(filename, 'pluginregistry.xml')
00213             self._compareDOM(text, _NO_PLUGINS_PLUGINREGISTRY_EXPORT)
00214             self.assertEqual(content_type, 'text/xml')

Here is the call graph for this function:

Definition at line 215 of file test_exportimport.py.

00215 
00216         def test_normal_with_plugins(self):
00217             from Products.PluginRegistry.exportimport \
00218                 import exportPluginRegistry
00219             ztapi.provideAdapter(None, ITraversable, AttrItemTraverser)
00220 
00221             app, registry = self._initRegistry(
00222                                     plugin_type_info=_PLUGIN_TYPE_INFO,
00223                                     plugins={IFoo: ('foo_plugin_1',
00224                                                     'foo_plugin_2')},
00225                                         )
00226             context = DummyExportContext(app)
00227             exportPluginRegistry(context)
00228 
00229             self.assertEqual( len(context._wrote), 1 )
00230             filename, text, content_type = context._wrote[0]
00231             self.assertEqual(filename, 'pluginregistry.xml')
00232             self._compareDOM(text, _NORMAL_PLUGINREGISTRY_EXPORT)
00233             self.assertEqual(content_type, 'text/xml')
00234 
    class PluginRegistryImporterTests(_TestBase):

Here is the call graph for this function:


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