test/unittest_rset.py
changeset 10187 0df931eb08de
parent 10087 ed0b076c119b
parent 10180 ea10572fccfe
child 10600 180aa08cad48
equal deleted inserted replaced
10177:7b95eae7669d 10187:0df931eb08de
   561 
   561 
   562             rset = req.execute('(Any X WHERE X is CWGroup, X name "managers")')
   562             rset = req.execute('(Any X WHERE X is CWGroup, X name "managers")')
   563             self.assertIsInstance(str(rset), basestring)
   563             self.assertIsInstance(str(rset), basestring)
   564             self.assertEqual(len(str(rset).splitlines()), 1)
   564             self.assertEqual(len(str(rset).splitlines()), 1)
   565 
   565 
       
   566     def test_nonregr_symmetric_relation(self):
       
   567         # see https://www.cubicweb.org/ticket/4739253
       
   568         with self.admin_access.client_cnx() as cnx:
       
   569             p1 = cnx.create_entity('Personne', nom=u'sylvain')
       
   570             cnx.create_entity('Personne', nom=u'denis', connait=p1)
       
   571             cnx.commit()
       
   572             rset = cnx.execute('Any X,Y WHERE X connait Y')
       
   573             rset.get_entity(0, 1) # used to raise KeyError
   566 
   574 
   567 if __name__ == '__main__':
   575 if __name__ == '__main__':
   568     unittest_main()
   576     unittest_main()