Exemple #1
0
    def test_Clear(self):
        friendly = FriendlyDateCriterion('foo', 'foofield')

        friendly.edit(value=None)
        self.assertEqual(friendly.value, None)
        self.assertEqual(friendly.operation, 'min')
        self.assertEqual(friendly.daterange, 'old')
Exemple #2
0
    def test_Clear( self ):
        friendly = FriendlyDateCriterion( 'foo', 'foofield' )

        friendly.edit( value=None )
        self.assertEqual( friendly.value, None )
        self.assertEqual( friendly.operation, 'min' )
        self.assertEqual( friendly.daterange, 'old' )
Exemple #3
0
    def test_Clear( self ):

        from Products.CMFTopic.DateCriteria import FriendlyDateCriterion
        friendly = FriendlyDateCriterion( 'foo', 'foofield' )

        friendly.edit( value=None )
        self.assertEqual( friendly.value, None )
        self.assertEqual( friendly.operation, 'min' )
        self.assertEqual( friendly.daterange, 'old' )
Exemple #4
0
    def test_Clear(self):

        from Products.CMFTopic.DateCriteria import FriendlyDateCriterion
        friendly = FriendlyDateCriterion('foo', 'foofield')

        friendly.edit(value=None)
        self.assertEqual(friendly.value, None)
        self.assertEqual(friendly.operation, 'min')
        self.assertEqual(friendly.daterange, 'old')
Exemple #5
0
    def test_StringAsValue( self ):
        friendly = FriendlyDateCriterion( 'foo', 'foofield' )

        friendly.edit( '4' )
        self.assertEqual( friendly.value, 4 )

        friendly.edit( '-4' )
        self.assertEqual( friendly.value, -4 )

        friendly.edit( '' )
        self.assertEqual( friendly.value, None )
Exemple #6
0
    def test_StringAsValue(self):
        friendly = FriendlyDateCriterion('foo', 'foofield')

        friendly.edit('4')
        self.assertEqual(friendly.value, 4)

        friendly.edit('-4')
        self.assertEqual(friendly.value, -4)

        friendly.edit('')
        self.assertEqual(friendly.value, None)
Exemple #7
0
    def test_StringAsValue( self ):

        from Products.CMFTopic.DateCriteria import FriendlyDateCriterion
        friendly = FriendlyDateCriterion( 'foo', 'foofield' )

        friendly.edit( '4' )
        self.assertEqual( friendly.value, 4 )

        friendly.edit( '-4' )
        self.assertEqual( friendly.value, -4 )

        friendly.edit( '' )
        self.assertEqual( friendly.value, None )
Exemple #8
0
    def test_StringAsValue(self):

        from Products.CMFTopic.DateCriteria import FriendlyDateCriterion
        friendly = FriendlyDateCriterion('foo', 'foofield')

        friendly.edit('4')
        self.assertEqual(friendly.value, 4)

        friendly.edit('-4')
        self.assertEqual(friendly.value, -4)

        friendly.edit('')
        self.assertEqual(friendly.value, None)