1515# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717#
18- # $Id: db_test_base.py,v 1.27.2.2 2004-06-08 05:35:44 richard Exp $
18+ # $Id: db_test_base.py,v 1.27.2.3 2004-06-09 06:37:22 richard Exp $
1919
2020import unittest , os , shutil , errno , imp , sys , time , pprint
2121
@@ -813,9 +813,9 @@ def testStringFind(self):
813813
814814 def filteringSetup (self ):
815815 for user in (
816- {'username' : 'bleep' },
817- {'username' : 'blop' },
818- {'username' : 'blorp' }):
816+ {'username' : 'bleep' , 'age' : 1 },
817+ {'username' : 'blop' , 'age' : 1.5 },
818+ {'username' : 'blorp' , 'age' : 2 }):
819819 self .db .user .create (** user )
820820 iss = self .db .issue
821821 for issue in (
@@ -840,6 +840,13 @@ def testFilteringID(self):
840840 ae (filt (None , {'id' : '2' }, ('+' ,'id' ), (None ,None )), ['2' ])
841841 ae (filt (None , {'id' : '10' }, ('+' ,'id' ), (None ,None )), [])
842842
843+ def testFilteringNumber (self ):
844+ self .filteringSetup ()
845+ ae , filt = self .assertEqual , self .db .user .filter
846+ ae (filt (None , {'age' : '1' }, ('+' ,'id' ), (None ,None )), ['3' ])
847+ ae (filt (None , {'age' : '1.5' }, ('+' ,'id' ), (None ,None )), ['4' ])
848+ ae (filt (None , {'age' : '2' }, ('+' ,'id' ), (None ,None )), ['5' ])
849+
843850 def testFilteringString (self ):
844851 ae , filt = self .filteringSetup ()
845852 ae (filt (None , {'title' : ['one' ]}, ('+' ,'id' ), (None ,None )), ['1' ])
0 commit comments