comparison test/test_db.py @ 1631:8a908bbad1ef

A couple of form value handling changes: - multilink properties may hhave multiple form values "1", "2,4", "5", ... - string search properties are split on whitespace and match any of the values
author Richard Jones <richard@users.sourceforge.net>
date Fri, 09 May 2003 01:47:51 +0000
parents cc96bf971b33
children 5ca448ff8052
comparison
equal deleted inserted replaced
1629:27768800be5c 1631:8a908bbad1ef
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: test_db.py,v 1.88 2003-04-22 20:53:55 kedder Exp $ 18 # $Id: test_db.py,v 1.89 2003-05-09 01:47:51 richard Exp $
19 19
20 import unittest, os, shutil, time 20 import unittest, os, shutil, time
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
672 ae, filt = self.filteringSetup() 672 ae, filt = self.filteringSetup()
673 ae(filt(None, {'id': '1'}, ('+','id'), (None,None)), ['1']) 673 ae(filt(None, {'id': '1'}, ('+','id'), (None,None)), ['1'])
674 674
675 def testFilteringString(self): 675 def testFilteringString(self):
676 ae, filt = self.filteringSetup() 676 ae, filt = self.filteringSetup()
677 ae(filt(None, {'title': 'issue one'}, ('+','id'), (None,None)), ['1']) 677 ae(filt(None, {'title': ['one']}, ('+','id'), (None,None)), ['1'])
678 ae(filt(None, {'title': 'issue'}, ('+','id'), (None,None)), 678 ae(filt(None, {'title': ['issue']}, ('+','id'), (None,None)),
679 ['1','2','3']) 679 ['1','2','3'])
680 ae(filt(None, {'title': ['one', 'two']}, ('+','id'), (None,None)),
681 ['1', '2'])
680 682
681 def testFilteringLink(self): 683 def testFilteringLink(self):
682 ae, filt = self.filteringSetup() 684 ae, filt = self.filteringSetup()
683 ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['2','3']) 685 ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['2','3'])
684 686

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