test/unittest_rset.py
branchstable
changeset 6195 a0c4441e6ddf
parent 5752 b0bb553e3be4
child 6225 a176e68b7d0d
child 6340 470d8e828fda
--- a/test/unittest_rset.py	Thu Sep 09 10:07:56 2010 +0200
+++ b/test/unittest_rset.py	Thu Sep 09 10:08:04 2010 +0200
@@ -368,6 +368,14 @@
                             'WITH B,T BEING (Any B,T WHERE B is Bookmark, B title T)')
         rset.related_entity(0, 2)
 
+    def test_related_entity_subquery_outerjoin(self):
+        rset = self.execute('Any X,S,L WHERE X in_state S '
+                            'WITH X, L BEING (Any X,MAX(L) GROUPBY X '
+                            'WHERE X is CWUser, T? wf_info_for X, T creation_date L)')
+        self.assertEquals(len(rset), 2)
+        rset.related_entity(0, 1)
+        rset.related_entity(0, 2)
+
     def test_entities(self):
         rset = self.execute('Any U,G WHERE U in_group G')
         # make sure we have at least one element