comparison test/db_test_base.py @ 3147:dbf80d7db63f

consistent text searching behaviour (AND everywhere) [SF#1101036]
author Richard Jones <richard@users.sourceforge.net>
date Sun, 13 Feb 2005 22:38:57 +0000
parents d9b4224f955c
children 57b60bda9473
comparison
equal deleted inserted replaced
3145:9aa9436a81e0 3147:dbf80d7db63f
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.58 2005-01-04 01:36:41 richard Exp $ 18 # $Id: db_test_base.py,v 1.59 2005-02-13 22:38:57 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
920 ae(filt(None, {'age': ['1','2']}, ('+','id'), (None,None)), ['3','5']) 920 ae(filt(None, {'age': ['1','2']}, ('+','id'), (None,None)), ['3','5'])
921 921
922 def testFilteringString(self): 922 def testFilteringString(self):
923 ae, filt = self.filteringSetup() 923 ae, filt = self.filteringSetup()
924 ae(filt(None, {'title': ['one']}, ('+','id'), (None,None)), ['1']) 924 ae(filt(None, {'title': ['one']}, ('+','id'), (None,None)), ['1'])
925 ae(filt(None, {'title': ['issue one']}, ('+','id'), (None,None)),
926 ['1'])
927 ae(filt(None, {'title': ['issue', 'one']}, ('+','id'), (None,None)),
928 ['1'])
925 ae(filt(None, {'title': ['issue']}, ('+','id'), (None,None)), 929 ae(filt(None, {'title': ['issue']}, ('+','id'), (None,None)),
926 ['1','2','3']) 930 ['1','2','3'])
927 ae(filt(None, {'title': ['one', 'two']}, ('+','id'), (None,None)), 931 ae(filt(None, {'title': ['one', 'two']}, ('+','id'), (None,None)),
928 ['1', '2']) 932 [])
929 933
930 def testFilteringLink(self): 934 def testFilteringLink(self):
931 ae, filt = self.filteringSetup() 935 ae, filt = self.filteringSetup()
932 ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['2','3']) 936 ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['2','3'])
933 ae(filt(None, {'assignedto': '-1'}, ('+','id'), (None,None)), ['3','4']) 937 ae(filt(None, {'assignedto': '-1'}, ('+','id'), (None,None)), ['3','4'])

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