Mercurial > p > roundup > code
comparison test/db_test_base.py @ 2185:c52a931879c4
sort/group by multilink in RDBMS
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 05 Apr 2004 07:13:10 +0000 |
| parents | 666402433998 |
| children | 85954067e496 |
comparison
equal
deleted
inserted
replaced
| 2184:d04ef0543c76 | 2185:c52a931879c4 |
|---|---|
| 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.20 2004-03-24 04:57:25 richard Exp $ | 18 # $Id: db_test_base.py,v 1.21 2004-04-05 07:13:10 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 |
| 890 # ascending should sort None, 1:10, 1d | 890 # ascending should sort None, 1:10, 1d |
| 891 ae(filt(None, {}, ('+','foo'), (None,None)), ['3', '4', '1', '2']) | 891 ae(filt(None, {}, ('+','foo'), (None,None)), ['3', '4', '1', '2']) |
| 892 # descending should sort 1d, 1:10, None | 892 # descending should sort 1d, 1:10, None |
| 893 ae(filt(None, {}, ('-','foo'), (None,None)), ['2', '1', '4', '3']) | 893 ae(filt(None, {}, ('-','foo'), (None,None)), ['2', '1', '4', '3']) |
| 894 | 894 |
| 895 def testFilteringMultilinkSort(self): | |
| 896 ae, filt = self.filteringSetup() | |
| 897 ae(filt(None, {}, ('+','nosy'), (None,None)), ['1', '2', '4', '3']) | |
| 898 ae(filt(None, {}, ('-','nosy'), (None,None)), ['3', '4', '1', '2']) | |
| 899 | |
| 895 # XXX add sorting tests for other types | 900 # XXX add sorting tests for other types |
| 896 # XXX test auditors and reactors | 901 # XXX test auditors and reactors |
| 897 | 902 |
| 898 def testImportExport(self): | 903 def testImportExport(self): |
| 899 # use the filtering setup to create a bunch of items | 904 # use the filtering setup to create a bunch of items |
