equal
deleted
inserted
replaced
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() |