server/test/unittest_querier.py
branchstable
changeset 5701 41119f034735
parent 5657 8f56691f01de
child 5707 3586d36d2a45
child 5782 8ff48d1a319f
equal deleted inserted replaced
5695:85bafafc1f22 5701:41119f034735
   787                           ['abort', 'activate', 'activated', 'ben non',
   787                           ['abort', 'activate', 'activated', 'ben non',
   788                            'deactivate', 'deactivated', 'done', 'en cours',
   788                            'deactivate', 'deactivated', 'done', 'en cours',
   789                            'end', 'finie', 'markasdone', 'pitetre', 'redoit',
   789                            'end', 'finie', 'markasdone', 'pitetre', 'redoit',
   790                            'start', 'todo'])
   790                            'start', 'todo'])
   791 
   791 
       
   792     def test_select_union_description_diff_var(self):
       
   793         eid1 = self.execute('CWGroup X WHERE X name "managers"')[0][0]
       
   794         eid2 = self.execute('CWUser X WHERE X login "admin"')[0][0]
       
   795         rset = self.execute('(Any X WHERE X eid %(x)s)'
       
   796                             ' UNION '
       
   797                             '(Any Y WHERE Y eid %(y)s)',
       
   798                             {'x': eid1, 'y': eid2})
       
   799         self.assertEquals(rset.description[:], [('CWGroup',), ('CWUser',)])
       
   800 
   792     def test_exists(self):
   801     def test_exists(self):
   793         geid = self.execute("INSERT CWGroup X: X name 'lulufanclub'")[0][0]
   802         geid = self.execute("INSERT CWGroup X: X name 'lulufanclub'")[0][0]
   794         self.execute("SET U in_group G WHERE G name 'lulufanclub'")
   803         self.execute("SET U in_group G WHERE G name 'lulufanclub'")
   795         peid = self.execute("INSERT Personne X: X prenom 'lulu', X nom 'petit'")[0][0]
   804         peid = self.execute("INSERT Personne X: X prenom 'lulu', X nom 'petit'")[0][0]
   796         rset = self.execute("Any X WHERE X prenom 'lulu',"
   805         rset = self.execute("Any X WHERE X prenom 'lulu',"