comparison test/db_test_base.py @ 2494:ea7fb2f416db

fixed RDBMS Class.find() to handle None value in multiple find... ...and a merge from maint-0-7
author Richard Jones <richard@users.sourceforge.net>
date Wed, 23 Jun 2004 23:19:07 +0000
parents f41539b3c486
children 682eefe8ef23
comparison
equal deleted inserted replaced
2492:fa871d7a3a0f 2494:ea7fb2f416db
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: db_test_base.py,v 1.32 2004-06-16 03:54:00 richard Exp $ 18 # $Id: db_test_base.py,v 1.33 2004-06-23 23:19:07 richard Exp $
19 19
20 import unittest, os, shutil, errno, imp, sys, time, pprint 20 import unittest, os, shutil, errno, imp, sys, time, pprint
21 21
22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \ 22 from roundup.hyperdb import String, Password, Link, Multilink, Date, \
23 Interval, DatabaseError, Boolean, Number, Node 23 Interval, DatabaseError, Boolean, Number, Node
755 self.assertEqual(got, [one, three]) 755 self.assertEqual(got, [one, three])
756 got = self.db.issue.find(assignedto={None:1}) 756 got = self.db.issue.find(assignedto={None:1})
757 got.sort() 757 got.sort()
758 self.assertEqual(got, [one, three]) 758 self.assertEqual(got, [one, three])
759 759
760 def testFindMultipleLink(self):
761 one, two, three, four = self._find_test_setup()
762 self.assertEqual(self.db.issue.find(status={'1':1, '3':1}),
763 [one, three, four])
764 self.assertEqual(self.db.issue.find(assignedto={None:1, '1':1}),
765 [one, three, four])
766
760 def testFindMultilink(self): 767 def testFindMultilink(self):
761 one, two, three, four = self._find_test_setup() 768 one, two, three, four = self._find_test_setup()
762 got = self.db.issue.find(nosy='2') 769 got = self.db.issue.find(nosy='2')
763 got.sort() 770 got.sort()
764 self.assertEqual(got, [two, three]) 771 self.assertEqual(got, [two, three])

Roundup Issue Tracker: http://roundup-tracker.org/