server/test/unittest_querier.py
changeset 7148 753b9b48b41e
parent 7088 76e0dba5f8f3
child 7166 dde161937d3e
equal deleted inserted replaced
7147:db63a05b260e 7148:753b9b48b41e
   759 
   759 
   760     def test_select_boolean(self):
   760     def test_select_boolean(self):
   761         rset = self.execute('Any N WHERE X is CWEType, X name N, X final %(val)s',
   761         rset = self.execute('Any N WHERE X is CWEType, X name N, X final %(val)s',
   762                             {'val': True})
   762                             {'val': True})
   763         self.assertEqual(sorted(r[0] for r in rset.rows), ['Boolean', 'Bytes',
   763         self.assertEqual(sorted(r[0] for r in rset.rows), ['Boolean', 'Bytes',
   764                                                             'Date', 'Datetime',
   764                                                            'Date', 'Datetime',
   765                                                             'Decimal', 'Float',
   765                                                            'Decimal', 'Float',
   766                                                             'Int', 'Interval',
   766                                                            'Int', 'Interval',
   767                                                             'Password', 'String',
   767                                                            'Password', 'String',
   768                                                             'Time'])
   768                                                            'TZDatetime', 'TZTime',
       
   769                                                            'Time'])
   769         rset = self.execute('Any N WHERE X is CWEType, X name N, X final TRUE')
   770         rset = self.execute('Any N WHERE X is CWEType, X name N, X final TRUE')
   770         self.assertEqual(sorted(r[0] for r in rset.rows), ['Boolean', 'Bytes',
   771         self.assertEqual(sorted(r[0] for r in rset.rows), ['Boolean', 'Bytes',
   771                                                             'Date', 'Datetime',
   772                                                            'Date', 'Datetime',
   772                                                             'Decimal', 'Float',
   773                                                            'Decimal', 'Float',
   773                                                             'Int', 'Interval',
   774                                                            'Int', 'Interval',
   774                                                             'Password', 'String',
   775                                                            'Password', 'String',
   775                                                             'Time'])
   776                                                            'TZDatetime', 'TZTime',
       
   777                                                            'Time'])
   776 
   778 
   777     def test_select_constant(self):
   779     def test_select_constant(self):
   778         rset = self.execute('Any X, "toto" ORDERBY X WHERE X is CWGroup')
   780         rset = self.execute('Any X, "toto" ORDERBY X WHERE X is CWGroup')
   779         self.assertEqual(rset.rows,
   781         self.assertEqual(rset.rows,
   780                           map(list, zip((2,3,4,5), ('toto','toto','toto','toto',))))
   782                           map(list, zip((2,3,4,5), ('toto','toto','toto','toto',))))