Esempio n. 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')
Esempio n. 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' )
Esempio n. 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' )
Esempio n. 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')
Esempio n. 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 )
Esempio n. 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)
Esempio n. 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 )
Esempio n. 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)