comparison test/db_test_base.py @ 3525:7be25d75c3d5

Fixed SQL generation for sort/group by separate Link properties [SF#1417565] Metakit fails the new test. I have no idea why.
author Richard Jones <richard@users.sourceforge.net>
date Mon, 30 Jan 2006 00:36:26 +0000
parents 34ada15b9936
children a4edd24c32be
comparison
equal deleted inserted replaced
3524:ed82c2c6ee34 3525:7be25d75c3d5
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.63 2006-01-23 05:24:33 richard Exp $ 18 # $Id: db_test_base.py,v 1.64 2006-01-30 00:36:26 richard Exp $
19 19
20 import unittest, os, shutil, errno, imp, sys, time, pprint, sets 20 import unittest, os, shutil, errno, imp, sys, time, pprint, sets
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
1019 # 4: ['1'] 1019 # 4: ['1']
1020 ae, filt = self.filteringSetup() 1020 ae, filt = self.filteringSetup()
1021 ae(filt(None, {}, ('+','nosy'), (None,None)), ['1', '2', '4', '3']) 1021 ae(filt(None, {}, ('+','nosy'), (None,None)), ['1', '2', '4', '3'])
1022 ae(filt(None, {}, ('-','nosy'), (None,None)), ['3', '4', '1', '2']) 1022 ae(filt(None, {}, ('-','nosy'), (None,None)), ['3', '4', '1', '2'])
1023 1023
1024 def testFilteringLinkSortGroup(self):
1025 # 1: status: 2, priority: 3
1026 # 2: status: 1, priority: 3
1027 # 3: status: 1, priority: 2,
1028 # 4: status: 3, priority: 2,
1029 ae, filt = self.filteringSetup()
1030 ae(filt(None, {}, ('+','status'), ('+','priority')),
1031 ['1', '2', '4', '3'])
1032
1024 def testFilteringDateSort(self): 1033 def testFilteringDateSort(self):
1025 # '1': '2003-02-16.22:50' 1034 # '1': '2003-02-16.22:50'
1026 # '2': '2003-01-01.00:00' 1035 # '2': '2003-01-01.00:00'
1027 # '3': '2003-02-18' 1036 # '3': '2003-02-18'
1028 # '4': '2004-03-08' 1037 # '4': '2004-03-08'

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