Mercurial > p > roundup > code
comparison test/db_test_base.py @ 3148:0a652c47bc9e maint-0.8
merge from HEAD
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sun, 13 Feb 2005 22:40:53 +0000 |
| parents | a7045bad20de |
| children | e1da7b5b04ab |
comparison
equal
deleted
inserted
replaced
| 3146:7ca7407133b7 | 3148:0a652c47bc9e |
|---|---|
| 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.55.2.2 2005-01-04 01:33:04 richard Exp $ | 18 # $Id: db_test_base.py,v 1.55.2.3 2005-02-13 22:40:53 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 |
| 918 ae(filt(None, {'age': ['1','2']}, ('+','id'), (None,None)), ['3','5']) | 918 ae(filt(None, {'age': ['1','2']}, ('+','id'), (None,None)), ['3','5']) |
| 919 | 919 |
| 920 def testFilteringString(self): | 920 def testFilteringString(self): |
| 921 ae, filt = self.filteringSetup() | 921 ae, filt = self.filteringSetup() |
| 922 ae(filt(None, {'title': ['one']}, ('+','id'), (None,None)), ['1']) | 922 ae(filt(None, {'title': ['one']}, ('+','id'), (None,None)), ['1']) |
| 923 ae(filt(None, {'title': ['issue one']}, ('+','id'), (None,None)), | |
| 924 ['1']) | |
| 925 ae(filt(None, {'title': ['issue', 'one']}, ('+','id'), (None,None)), | |
| 926 ['1']) | |
| 923 ae(filt(None, {'title': ['issue']}, ('+','id'), (None,None)), | 927 ae(filt(None, {'title': ['issue']}, ('+','id'), (None,None)), |
| 924 ['1','2','3']) | 928 ['1','2','3']) |
| 925 ae(filt(None, {'title': ['one', 'two']}, ('+','id'), (None,None)), | 929 ae(filt(None, {'title': ['one', 'two']}, ('+','id'), (None,None)), |
| 926 ['1', '2']) | 930 []) |
| 927 | 931 |
| 928 def testFilteringLink(self): | 932 def testFilteringLink(self): |
| 929 ae, filt = self.filteringSetup() | 933 ae, filt = self.filteringSetup() |
| 930 ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['2','3']) | 934 ae(filt(None, {'status': '1'}, ('+','id'), (None,None)), ['2','3']) |
| 931 ae(filt(None, {'assignedto': '-1'}, ('+','id'), (None,None)), ['3','4']) | 935 ae(filt(None, {'assignedto': '-1'}, ('+','id'), (None,None)), ['3','4']) |
