Back to index

plone3  3.1.7
Public Member Functions | Private Member Functions
CMFTopic.tests.test_SSC.SimpleStringCriterionTests Class Reference
Inheritance diagram for CMFTopic.tests.test_SSC.SimpleStringCriterionTests:
Inheritance graph
[legend]
Collaboration diagram for CMFTopic.tests.test_SSC.SimpleStringCriterionTests:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def test_Empty
def test_Nonempty

Private Member Functions

def _getTargetClass

Detailed Description

Definition at line 24 of file test_SSC.py.


Member Function Documentation

Definition at line 26 of file test_SSC.py.

00026 
00027     def _getTargetClass(self):
00028         from Products.CMFTopic.SimpleStringCriterion \
00029                 import SimpleStringCriterion
00030 
00031         return SimpleStringCriterion

Definition at line 32 of file test_SSC.py.

00032 
00033     def test_Empty( self ):
00034         ssc = self._makeOne('foo', 'foofield')
00035 
00036         self.assertEqual( ssc.getId(), 'foo' )
00037         self.assertEqual( ssc.field, 'foofield' )
00038         self.assertEqual( ssc.value, '' )
00039         self.assertEqual( len( ssc.getCriteriaItems() ), 0 )

Definition at line 40 of file test_SSC.py.

00040 
00041     def test_Nonempty( self ):
00042         ssc = self._makeOne('foo', 'foofield')
00043         ssc.edit( 'bar' )
00044 
00045         self.assertEqual( ssc.getId(), 'foo' )
00046         self.assertEqual( ssc.field, 'foofield' )
00047         self.assertEqual( ssc.value, 'bar' )
00048 
00049         items = ssc.getCriteriaItems()
00050 
00051         self.assertEqual( len( items ), 1 )
00052         self.assertEqual( len( items[0] ), 2 )
00053         self.assertEqual( items[0][0], 'foofield' )
00054         self.assertEqual( items[0][1], 'bar' )
00055 


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