[querier test] remove some actually bad tests that were passing thanks to a sqlite bug
Now, rql has been fixed to correctly detect this kind of query can't be
answered correctly
--- a/server/test/unittest_querier.py Wed Sep 08 10:32:46 2010 +0200
+++ b/server/test/unittest_querier.py Thu Sep 09 10:07:56 2010 +0200
@@ -678,10 +678,8 @@
self.assertEqual(len(rset.rows), 1, rset.rows)
def test_select_ordered_distinct_1(self):
- self.execute("INSERT Affaire X: X sujet 'cool', X ref '1'")
- self.execute("INSERT Affaire X: X sujet 'cool', X ref '2'")
- rset = self.execute('DISTINCT Any S ORDERBY R WHERE A is Affaire, A sujet S, A ref R')
- self.assertEqual(rset.rows, [['cool']])
+ self.assertRaises(BadRQLQuery,
+ self.execute, 'DISTINCT Any S ORDERBY R WHERE A is Affaire, A sujet S, A ref R')
def test_select_ordered_distinct_2(self):
self.execute("INSERT Affaire X: X sujet 'minor'")
--- a/server/test/unittest_rql2sql.py Wed Sep 08 10:32:46 2010 +0200
+++ b/server/test/unittest_rql2sql.py Thu Sep 09 10:07:56 2010 +0200
@@ -429,11 +429,6 @@
GROUP BY _X.cw_data_name,_X.cw_data_format
ORDER BY 1,2,_X.cw_data_format'''),
- ('DISTINCT Any S ORDERBY R WHERE A is Affaire, A sujet S, A ref R',
- '''SELECT T1.C0 FROM (SELECT DISTINCT _A.cw_sujet AS C0, _A.cw_ref AS C1
-FROM cw_Affaire AS _A
-ORDER BY 2) AS T1'''),
-
('DISTINCT Any MAX(X)+MIN(LENGTH(D)), N GROUPBY N ORDERBY 2, DF WHERE X data_name N, X data D, X data_format DF;',
'''SELECT T1.C0,T1.C1 FROM (SELECT DISTINCT (MAX(_X.cw_eid) + MIN(LENGTH(_X.cw_data))) AS C0, _X.cw_data_name AS C1, _X.cw_data_format AS C2
FROM cw_File AS _X