Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes
CMFActionIcons.tests.test_exportimport.Test_importActionIconsTool Class Reference
Inheritance diagram for CMFActionIcons.tests.test_exportimport.Test_importActionIconsTool:
Inheritance graph
[legend]
Collaboration diagram for CMFActionIcons.tests.test_exportimport.Test_importActionIconsTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_normal
def test_nopurge

Static Public Attributes

 layer = ExportImportZCMLLayer
string CATEGORY = 'testing'
string ACTION_ID = "test_action"
string TITLE = "Action Title"
int PRIORITY = 60
string ICON_EXPR = 'test_icon'

Detailed Description

Definition at line 223 of file test_exportimport.py.


Member Function Documentation

Definition at line 248 of file test_exportimport.py.

00248 
00249     def test_nopurge(self):
00250         from Products.CMFActionIcons.exportimport \
00251             import importActionIconsTool
00252 
00253         site = self._initSite(with_icon=True)
00254         ait = site.portal_actionicons
00255         ait.updateActionIcon(self.CATEGORY, self.ACTION_ID, 'somexpr',
00256                              title='foo', priority=123)
00257         self.assertEqual(len(ait.listActionIcons()), 1)
00258 
00259         context = DummyImportContext(site, purge=False)
00260         context._files['actionicons.xml'] = self._WITH_ICON_EXPORT
00261         importActionIconsTool(context)
00262 
00263         self.assertEqual(len(ait.listActionIcons()), 1)
00264         action_icon = ait.listActionIcons()[0]
00265 
00266         self.assertEqual(action_icon.getCategory(), self.CATEGORY)
00267         self.assertEqual(action_icon.getActionId(), self.ACTION_ID)
00268         self.assertEqual(action_icon.getTitle(), self.TITLE)
00269         self.assertEqual(action_icon.getPriority(), self.PRIORITY)
00270         self.assertEqual(action_icon.getExpression(), self.ICON_EXPR)
00271 

Here is the call graph for this function:

Definition at line 227 of file test_exportimport.py.

00227 
00228     def test_normal(self):
00229         from Products.CMFActionIcons.exportimport \
00230             import importActionIconsTool
00231 
00232         site = self._initSite(with_icon=False)
00233         ait = site.portal_actionicons
00234         self.assertEqual(len(ait.listActionIcons()), 0)
00235 
00236         context = DummyImportContext(site)
00237         context._files['actionicons.xml'] = self._WITH_ICON_EXPORT
00238         importActionIconsTool(context)
00239 
00240         self.assertEqual(len(ait.listActionIcons()), 1)
00241         action_icon = ait.listActionIcons()[0]
00242 
00243         self.assertEqual(action_icon.getCategory(), self.CATEGORY)
00244         self.assertEqual(action_icon.getActionId(), self.ACTION_ID)
00245         self.assertEqual(action_icon.getTitle(), self.TITLE)
00246         self.assertEqual(action_icon.getPriority(), self.PRIORITY)
00247         self.assertEqual(action_icon.getExpression(), self.ICON_EXPR)

Here is the call graph for this function:


Member Data Documentation

Definition at line 34 of file test_exportimport.py.

Definition at line 33 of file test_exportimport.py.

Definition at line 37 of file test_exportimport.py.

Definition at line 225 of file test_exportimport.py.

Definition at line 36 of file test_exportimport.py.

string CMFActionIcons.tests.test_exportimport._ActionIconsToolSetup.TITLE = "Action Title" [static, inherited]

Definition at line 35 of file test_exportimport.py.


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