Back to index

plone3  3.1.7
Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes
plone.app.viewletmanager.tests.test_exportimport.ViewletSettingsStorageXMLAdapterTests Class Reference
Inheritance diagram for plone.app.viewletmanager.tests.test_exportimport.ViewletSettingsStorageXMLAdapterTests:
Inheritance graph
[legend]
Collaboration diagram for plone.app.viewletmanager.tests.test_exportimport.ViewletSettingsStorageXMLAdapterTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp

Public Attributes

 site

Static Public Attributes

 layer = Layer

Private Member Functions

def _getTargetClass
def _populate
def _verifyImport

Private Attributes

 _obj
 _BODY

Detailed Description

Definition at line 136 of file test_exportimport.py.


Member Function Documentation

Definition at line 140 of file test_exportimport.py.

00140 
00141     def _getTargetClass(self):
00142         from plone.app.viewletmanager.exportimport.storage \
00143                     import ViewletSettingsStorageNodeAdapter
00144         return ViewletSettingsStorageNodeAdapter

Definition at line 145 of file test_exportimport.py.

00145 
00146     def _populate(self, obj):
00147         obj.setOrder('top', 'fancy', ('two', 'three', 'one'))
00148         obj.setOrder('top', 'basic', ('one',))
00149         obj.setHidden('top', 'light', ('two',))

Here is the caller graph for this function:

Definition at line 150 of file test_exportimport.py.

00150 
00151     def _verifyImport(self, obj):
00152         fancydict = {'top': ('two', 'three', 'one')}
00153         hiddendict = {'top': ('two',)}
00154         self.assertEqual(type(obj._order), PersistentDict)
00155         self.failUnless('fancy' in obj._order.keys())
00156         self.assertEqual(type(obj._order['fancy']), PersistentDict)
00157         self.assertEqual(dict(obj._order['fancy']), fancydict)
00158         self.assertEqual(type(obj._hidden), PersistentDict)
00159         self.failUnless('light' in obj._hidden.keys())
00160         self.assertEqual(type(obj._hidden['light']), PersistentDict)
00161         self.assertEqual(dict(obj._hidden['light']), hiddendict)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 162 of file test_exportimport.py.

00162 
00163     def setUp(self):
00164         setHooks()
00165         self.site = Folder('site')
00166         gen = PloneGenerator()
00167         gen.enableSite(self.site)
00168         setSite(self.site)
00169         sm = getSiteManager()
00170         sm.registerUtility(ViewletSettingsStorage(), IViewletSettingsStorage)
00171 
00172         self._obj = getUtility(IViewletSettingsStorage)
00173 
00174         self._BODY = _VIEWLETS_XML


Member Data Documentation

Definition at line 173 of file test_exportimport.py.

Definition at line 171 of file test_exportimport.py.

Definition at line 138 of file test_exportimport.py.

Definition at line 164 of file test_exportimport.py.


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