Back to index

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

List of all members.

Public Member Functions

def test_empty
def test_normal
def setUp

Public Attributes

 site
 storage

Static Public Attributes

 layer = Layer

Detailed Description

Definition at line 204 of file test_exportimport.py.


Member Function Documentation

Definition at line 179 of file test_exportimport.py.

00179 
00180     def setUp(self):
00181         BaseRegistryTests.setUp(self)
00182         setHooks()
00183         self.root.site = Folder(id='site')
00184         self.site = self.root.site
00185         gen = PloneGenerator()
00186         gen.enableSite(self.site)
00187         setSite(self.site)
00188         sm = getSiteManager(self.site)
00189         sm.registerUtility(ViewletSettingsStorage(), IViewletSettingsStorage)
00190         self.storage = getUtility(IViewletSettingsStorage)

Definition at line 206 of file test_exportimport.py.

00206 
00207     def test_empty(self):
00208         from plone.app.viewletmanager.exportimport.storage import \
00209                                                 exportViewletSettingsStorage
00210 
00211         context = DummyExportContext(self.site)
00212         exportViewletSettingsStorage(context)
00213 
00214         self.assertEqual(len(context._wrote), 1)
00215         filename, text, content_type = context._wrote[0]
00216         self.assertEqual(filename, 'viewlets.xml')
00217         self._compareDOM(text, _EMPTY_EXPORT)
00218         self.assertEqual(content_type, 'text/xml')

Here is the call graph for this function:

Definition at line 219 of file test_exportimport.py.

00219 
00220     def test_normal(self):
00221         from plone.app.viewletmanager.exportimport.storage import \
00222                                                 exportViewletSettingsStorage
00223 
00224         _ORDER = COMMON_SETUP_ORDER
00225         _HIDDEN = COMMON_SETUP_HIDDEN
00226         self._populateSite(order=_ORDER, hidden=_HIDDEN)
00227         
00228         context = DummyExportContext(self.site)
00229         exportViewletSettingsStorage(context)
00230 
00231         self.assertEqual(len(context._wrote), 1)
00232         filename, text, content_type = context._wrote[0]
00233         self.assertEqual(filename, 'viewlets.xml')
00234         self._compareDOM(text, _VIEWLETS_XML)
00235         self.assertEqual(content_type, 'text/xml')
00236 

Here is the call graph for this function:


Member Data Documentation

Definition at line 177 of file test_exportimport.py.

Definition at line 183 of file test_exportimport.py.

Definition at line 189 of file test_exportimport.py.


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