Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
CMFPlone.tests.testActionIconsTool.TestActionIconsTool Class Reference
Inheritance diagram for CMFPlone.tests.testActionIconsTool.TestActionIconsTool:
Inheritance graph
[legend]
Collaboration diagram for CMFPlone.tests.testActionIconsTool.TestActionIconsTool:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testAddActionIcon
def testRenderActionIcon
def testRenderDefaultActionIcon
def testRenderNoneActionIcon
def setRequestMethod
def getAuthenticator
def setupAuthenticator

Public Attributes

 actionicons

Detailed Description

Definition at line 8 of file testActionIconsTool.py.


Member Function Documentation

Definition at line 10 of file testActionIconsTool.py.

00010 
00011     def afterSetUp(self):
00012         self.actionicons = self.portal.portal_actionicons
00013         self._refreshSkinData()
        

Definition at line 30 of file PloneTestCase.py.

00030 
00031     def getAuthenticator(self):
00032         tag = AuthenticatorView('context', 'request').authenticator()
00033         pattern = '<input .*name="(\w+)".*value="(\w+)"'
00034         return match(pattern, tag).groups()

Here is the call graph for this function:

Here is the caller graph for this function:

def CMFPlone.tests.PloneTestCase.PloneTestCase.setRequestMethod (   self,
  method 
) [inherited]
This is a stub now, but in case you want to try
   something fancy on Your Branch (tm), put it here.

Definition at line 26 of file PloneTestCase.py.

00026 
00027     def setRequestMethod(self, method):
00028         self.app.REQUEST.set('REQUEST_METHOD', method)
00029         self.app.REQUEST.method = method

Here is the caller graph for this function:

Definition at line 35 of file PloneTestCase.py.

00035 
00036     def setupAuthenticator(self):
00037         name, token = self.getAuthenticator()
00038         self.app.REQUEST.form[name] = token
00039 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 14 of file testActionIconsTool.py.

00014 
00015     def testAddActionIcon(self):
00016         length = len(self.actionicons.listActionIcons())
00017         self.actionicons.addActionIcon('content_actions',
00018                                        'preview',
00019                                        'lock_icon.gif',
00020                                        title='preview')
00021         action_icons=self.actionicons.listActionIcons()
00022         preview=action_icons[-1]
00023         self.assertEqual(len(action_icons), length+1)
00024         self.assertEqual(preview._category, 'content_actions')
00025         self.assertEqual(preview._action_id, 'preview')
00026         self.assertEqual(preview._title, 'preview')

Here is the caller graph for this function:

Definition at line 27 of file testActionIconsTool.py.

00027 
00028     def testRenderActionIcon(self):
00029         self.testAddActionIcon()
00030         icon=self.actionicons.renderActionIcon('content_actions',
00031                                                'preview')
00032         obj=self.portal.restrictedTraverse('lock_icon.gif')
00033         self.assertEqual(obj, icon)

Here is the call graph for this function:

Definition at line 34 of file testActionIconsTool.py.

00034 
00035     def testRenderDefaultActionIcon(self):
00036         icon=self.actionicons.renderActionIcon('content_actions',
00037                                                'doesnotexist',
00038                                                default='document_icon.gif')
00039         obj=self.portal.restrictedTraverse('document_icon.gif')
00040         self.assertEqual(obj, icon)

Definition at line 41 of file testActionIconsTool.py.

00041 
00042     def testRenderNoneActionIcon(self):
00043         icon=self.actionicons.renderActionIcon('content_actions',
00044                                                'doesnotexist',
00045                                                None)
00046         self.assertEqual(icon, None)
00047 


Member Data Documentation

Definition at line 11 of file testActionIconsTool.py.


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