fix tests broken by lgdb update
authorAlexandre Fayolle <alexandre.fayolle@logilab.fr>
Mon, 05 Dec 2011 15:20:21 +0100
changeset 8109 67d540b7f8c8
parent 8105 7980b36fb1aa
child 8110 d743865ba7ed
fix tests broken by lgdb update
server/test/unittest_rql2sql.py
--- a/server/test/unittest_rql2sql.py	Mon Dec 05 13:37:40 2011 +0100
+++ b/server/test/unittest_rql2sql.py	Mon Dec 05 15:20:21 2011 +0100
@@ -19,7 +19,7 @@
 
 import sys
 import os
-
+from datetime import date
 from logilab.common.testlib import TestCase, unittest_main, mock_object
 
 from rql import BadRQLQuery
@@ -1747,7 +1747,7 @@
 class SqlServer2005SQLGeneratorTC(PostgresSQLGeneratorTC):
     backend = 'sqlserver2005'
     def _norm_sql(self, sql):
-        return sql.strip().replace(' SUBSTR', ' SUBSTRING').replace(' || ', ' + ').replace(' ILIKE ', ' LIKE ').replace('TRUE', '1').replace('FALSE', '0')
+        return sql.strip().replace(' SUBSTR', ' SUBSTRING').replace(' || ', ' + ').replace(' ILIKE ', ' LIKE ').replace('TRUE', '1').replace('FALSE', '0').replace('CURRENT_DATE', str(date.today()))
 
     def test_has_text(self):
         for t in self._parse(HAS_TEXT_LG_INDEXER):