Back to index

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

List of all members.

Public Member Functions

def test_extractPortletNode
def test_extractPortletNode_defaultManagerInterface
def afterSetUp

Public Attributes

 sm
 importer
 exporter

Detailed Description

Definition at line 173 of file test_exportimport.py.


Member Function Documentation

Definition at line 25 of file test_exportimport.py.

00025 
00026     def afterSetUp(self):
00027         setHooks()
00028         setSite(self.portal)
00029         self.sm = getSiteManager(self.portal)
00030         self.importer = self.exporter = PortletsXMLAdapter(self.sm,
00031           DummySetupEnviron())
   

Here is the call graph for this function:

Definition at line 175 of file test_exportimport.py.

00175 
00176     def test_extractPortletNode(self):
00177         node = parseString(_XML_MULTIPLE_INTERFACES).documentElement
00178         self.importer._initPortletNode(node)
00179         portlet = getUtility(IPortletType, 'portlets.New')
00180         node = self.exporter._extractPortletNode('portlets.New', portlet)
00181         file = StringIO()
00182         node.writexml(file)
00183         file.seek(0)
00184         self.assertEqual("""<portlet title="Foo" addview="portlets.New" description="Foo"><for interface="plone.app.portlets.interfaces.IColumn"/><for interface="plone.app.portlets.interfaces.IDashboard"/></portlet>""", file.read())
    

Definition at line 185 of file test_exportimport.py.

00185 
00186     def test_extractPortletNode_defaultManagerInterface(self):
00187         node = parseString(_XML_EXPLICIT_DEFAULT_INTERFACE).documentElement
00188         self.importer._initPortletNode(node)
00189         portlet = getUtility(IPortletType, 'portlets.New')
00190         node = self.exporter._extractPortletNode('portlets.New', portlet)
00191         file = StringIO()
00192         node.writexml(file)
00193         file.seek(0)
00194         self.assertEqual("""<portlet title="Foo" addview="portlets.New" description="Foo"/>""", file.read())


Member Data Documentation

Definition at line 29 of file test_exportimport.py.

Definition at line 29 of file test_exportimport.py.

Definition at line 28 of file test_exportimport.py.


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