comparison test/db_test_base.py @ 2495:8ff455218ec2 maint-0.7

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Wed, 23 Jun 2004 23:21:32 +0000
parents a15f91a10e45
children 4d112730e02f
comparison
equal deleted inserted replaced
2493:164b704c8f98 2495:8ff455218ec2
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.27.2.5 2004-06-21 04:34:58 richard Exp $ 18 # $Id: db_test_base.py,v 1.27.2.6 2004-06-23 23:21:32 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/