server/test/unittest_session.py
changeset 7970 83075d897943
parent 7791 31bb51ea5485
parent 7969 d43569aaf5d6
child 8542 7e264ce34cd4
--- a/server/test/unittest_session.py	Tue Oct 18 17:08:05 2011 +0200
+++ b/server/test/unittest_session.py	Thu Oct 20 14:20:46 2011 +0200
@@ -88,7 +88,7 @@
         self.assertEqual(session.disabled_hook_categories, set())
         self.assertEqual(session.enabled_hook_categories, set())
 
-    def test_build_descr(self):
+    def test_build_descr1(self):
         rset = self.execute('(Any U,L WHERE U login L) UNION (Any G,N WHERE G name N, G is CWGroup)')
         orig_length = len(rset)
         rset.rows[0][0] = 9999999
@@ -97,6 +97,18 @@
         self.assertEqual(len(rset.rows), orig_length - 1)
         self.assertFalse(rset.rows[0][0] == 9999999)
 
+    def test_build_descr2(self):
+        rset = self.execute('Any X,Y WITH X,Y BEING ((Any G,NULL WHERE G is CWGroup) UNION (Any U,G WHERE U in_group G))')
+        for x, y in rset.description:
+            if y is not None:
+                self.assertEqual(y, 'CWGroup')
+
+    def test_build_descr3(self):
+        rset = self.execute('(Any G,NULL WHERE G is CWGroup) UNION (Any U,G WHERE U in_group G)')
+        for x, y in rset.description:
+            if y is not None:
+                self.assertEqual(y, 'CWGroup')
+
 
 if __name__ == '__main__':
     unittest_main()