test/unittest_rset.py
changeset 10187 0df931eb08de
parent 10087 ed0b076c119b
parent 10180 ea10572fccfe
child 10600 180aa08cad48
--- a/test/unittest_rset.py	Mon Feb 02 12:32:07 2015 +0100
+++ b/test/unittest_rset.py	Thu Feb 05 15:49:02 2015 +0100
@@ -563,6 +563,14 @@
             self.assertIsInstance(str(rset), basestring)
             self.assertEqual(len(str(rset).splitlines()), 1)
 
+    def test_nonregr_symmetric_relation(self):
+        # see https://www.cubicweb.org/ticket/4739253
+        with self.admin_access.client_cnx() as cnx:
+            p1 = cnx.create_entity('Personne', nom=u'sylvain')
+            cnx.create_entity('Personne', nom=u'denis', connait=p1)
+            cnx.commit()
+            rset = cnx.execute('Any X,Y WHERE X connait Y')
+            rset.get_entity(0, 1) # used to raise KeyError
 
 if __name__ == '__main__':
     unittest_main()