Back to index

plone3  3.1.7
Public Member Functions | Public Attributes
Archetypes.tests.test_fieldvalidation.TestSettings Class Reference
Inheritance diagram for Archetypes.tests.test_fieldvalidation.TestSettings:
Inheritance graph
[legend]
Collaboration diagram for Archetypes.tests.test_fieldvalidation.TestSettings:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def afterSetUp
def testSettings

Public Attributes

 instance

Detailed Description

Definition at line 112 of file test_fieldvalidation.py.


Member Function Documentation

Definition at line 114 of file test_fieldvalidation.py.

00114 
00115     def afterSetUp(self):
00116         instance = FakeType('fake')
00117         self.instance = instance.__of__(self.folder)

Definition at line 118 of file test_fieldvalidation.py.

00118 
00119     def testSettings(self):
00120         # tests every setting in global "settings"
00121         for setting in settings:
00122             field = Field('orchestra', **setting['field'])
00123             result = field.validate(setting['value'], self.instance, errors={})
00124             msg = 'Assertion failed for setting:\n%s.\nResult was "%s".' % \
00125                   (setting, result)
00126 
00127             self.assert_(setting['assertion'](result),
00128                          setting.get('failmsg', msg))
00129 


Member Data Documentation

Definition at line 116 of file test_fieldvalidation.py.


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