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')
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' )
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' )
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')
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 )
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)
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 )
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)