Back to index

plone3  3.1.7
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
CMFCore.exportimport.tests.test_typeinfo.TypeInformationXMLAdapterTests Class Reference
Inheritance diagram for CMFCore.exportimport.tests.test_typeinfo.TypeInformationXMLAdapterTests:
Inheritance graph
[legend]
Collaboration diagram for CMFCore.exportimport.tests.test_typeinfo.TypeInformationXMLAdapterTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp

Static Public Attributes

 layer = ExportImportZCMLLayer

Private Member Functions

def _getTargetClass
def _populate
def _verifyImport

Private Attributes

 _obj
 _BODY

Detailed Description

Definition at line 258 of file test_typeinfo.py.


Member Function Documentation

Definition at line 262 of file test_typeinfo.py.

00262 
00263     def _getTargetClass(self):
00264         from Products.CMFCore.exportimport.typeinfo \
00265                 import TypeInformationXMLAdapter
00266 
00267         return TypeInformationXMLAdapter

Definition at line 268 of file test_typeinfo.py.

00268 
00269     def _populate(self, obj):
00270         obj.setMethodAliases({'(Default)': 'foo', 'view': 'foo'})
00271         obj.addAction('foo_action', 'Foo', 'string:${object_url}/foo',
00272                       'python:1', (), 'Bar')

Here is the caller graph for this function:

Definition at line 273 of file test_typeinfo.py.

00273 
00274     def _verifyImport(self, obj):
00275         self.assertEqual(type(obj._aliases), dict)
00276         self.assertEqual(obj._aliases, {'(Default)': 'foo', 'view': 'foo'})
00277         self.assertEqual(type(obj._aliases['view']), str)
00278         self.assertEqual(obj._aliases['view'], 'foo')
00279         self.assertEqual(type(obj._actions), tuple)
00280         self.assertEqual(type(obj._actions[0].id), str)
00281         self.assertEqual(obj._actions[0].id, 'foo_action')
00282         self.assertEqual(type(obj._actions[0].title), str)
00283         self.assertEqual(obj._actions[0].title, 'Foo')
00284         self.assertEqual(type(obj._actions[0].description), str)
00285         self.assertEqual(obj._actions[0].description, '')
00286         self.assertEqual(type(obj._actions[0].category), str)
00287         self.assertEqual(obj._actions[0].category, 'Bar')
00288         self.assertEqual(type(obj._actions[0].condition.text), str)
00289         self.assertEqual(obj._actions[0].condition.text, 'python:1')

Here is the caller graph for this function:

Definition at line 290 of file test_typeinfo.py.

00290 
00291     def setUp(self):
00292         BodyAdapterTestCase.setUp(self)
00293         self._obj = FactoryTypeInformation('foo_fti')
00294         self._BODY = _FTI_BODY
00295 


Member Data Documentation

Definition at line 293 of file test_typeinfo.py.

Definition at line 292 of file test_typeinfo.py.

Definition at line 260 of file test_typeinfo.py.


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