Back to index

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

List of all members.

Public Member Functions

def test_parseXML_empty
def test_parseXML_with_info

Static Public Attributes

string V_OBJECT_ID = 'v_object_id'
string V_CONTEXT_TYPE = 'v_context_type'
string V_BUTTON = 'v_button'
list V_VALIDATORS = ['validator1', 'validator2']
string A_OBJECT_ID = 'a_object_id'
string A_STATUS = 'a_status'
string A_CONTEXT_TYPE = 'a_context_type'
string A_BUTTON = 'a_button'
string A_ACTION_TYPE = 'redirect_to'
string A_ACTION_ARG = 'string:action_arg'

Private Member Functions

def _getTargetClass

Detailed Description

Definition at line 134 of file test_exportimport.py.


Member Function Documentation

Definition at line 136 of file test_exportimport.py.

00136 
00137     def _getTargetClass(self):
00138         from Products.CMFFormController.exportimport \
00139                 import CMFFormControllerImportConfigurator
00140 
00141         return CMFFormControllerImportConfigurator

Definition at line 142 of file test_exportimport.py.

00142 
00143     def test_parseXML_empty(self):
00144         site = self._initSite(with_info=False)
00145         configurator = self._makeOne(site)
00146         fc_info = configurator.parseXML(self._EMPTY_EXPORT)
00147 
00148         self.assertEqual(len(fc_info['actions']), 0)
00149         self.assertEqual(len(fc_info['validators']), 0)

Definition at line 150 of file test_exportimport.py.

00150 
00151     def test_parseXML_with_info(self):
00152         site = self._initSite(with_info=False)
00153         configurator = self._makeOne(site)
00154         fc_info = configurator.parseXML(self._WITH_INFO_EXPORT)
00155 
00156         self.assertEqual(len(fc_info['actions']), 1)
00157         self.assertEqual(len(fc_info['validators']), 1)
00158 
00159         info = fc_info['actions'][0]
00160         self.assertEqual(info['object_id'], self.A_OBJECT_ID)
00161         self.assertEqual(info['status'], self.A_STATUS)
00162         self.assertEqual(info['context_type'], self.A_CONTEXT_TYPE)
00163         self.assertEqual(info['button'], self.A_BUTTON)
00164         self.assertEqual(info['action_type'], self.A_ACTION_TYPE)
00165         self.assertEqual(info['action_arg'], self.A_ACTION_ARG)
00166         info = fc_info['validators'][0]
00167         self.assertEqual(info['object_id'], self.V_OBJECT_ID)
00168         self.assertEqual(info['context_type'], self.V_CONTEXT_TYPE)
00169         self.assertEqual(info['button'], self.V_BUTTON)
00170         self.assertEqual(info['validators'], ','.join(self.V_VALIDATORS))
00171 


Member Data Documentation

Definition at line 35 of file test_exportimport.py.

Definition at line 34 of file test_exportimport.py.

Definition at line 33 of file test_exportimport.py.

Definition at line 32 of file test_exportimport.py.

Definition at line 30 of file test_exportimport.py.

Definition at line 31 of file test_exportimport.py.

Definition at line 27 of file test_exportimport.py.

Definition at line 26 of file test_exportimport.py.

Definition at line 25 of file test_exportimport.py.

list CMFFormController.tests.test_exportimport._CMFFormControllerSetup.V_VALIDATORS = ['validator1', 'validator2'] [static, inherited]

Definition at line 28 of file test_exportimport.py.


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