Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFDefault.tests.test_MetadataTool.TestElementSpec Class Reference

List of all members.

Public Member Functions

def test_empty_single_valued
def test_empty_multi_valued

Private Member Functions

def _getTargetClass
def _makeOne

Detailed Description

Definition at line 74 of file test_MetadataTool.py.


Member Function Documentation

Definition at line 76 of file test_MetadataTool.py.

00076 
00077     def _getTargetClass( self ):
00078         from Products.CMFDefault.MetadataTool import ElementSpec
00079         return ElementSpec

def CMFDefault.tests.test_MetadataTool.TestElementSpec._makeOne (   self,
  args,
  kw 
) [private]

Definition at line 80 of file test_MetadataTool.py.

00080 
00081     def _makeOne( self, *args, **kw ):
00082         return self._getTargetClass()( *args, **kw )

Here is the call graph for this function:

Definition at line 91 of file test_MetadataTool.py.

00091 
00092     def test_empty_multi_valued( self ):
00093         mv_spec = self._makeOne( 1 )
00094         self.failUnless( mv_spec.isMultiValued() )
00095         self.assertEqual( mv_spec.getPolicy(), mv_spec.getPolicy( 'XYZ' ) )
00096         policies = mv_spec.listPolicies()
00097         self.assertEqual( len( policies ), 1 )
00098         self.assertEqual( policies[0][0], None )
00099 
00100 

Definition at line 83 of file test_MetadataTool.py.

00083 
00084     def test_empty_single_valued( self ):
00085         sv_spec = self._makeOne( 0 )
00086         self.failIf( sv_spec.isMultiValued() )
00087         self.assertEqual( sv_spec.getPolicy(), sv_spec.getPolicy( 'XYZ' ) )
00088         policies = sv_spec.listPolicies()
00089         self.assertEqual( len( policies ), 1 )
00090         self.assertEqual( policies[0][0], None )


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