server/test/unittest_fti.py
branchstable
changeset 6436 275e9f402ccc
parent 6340 470d8e828fda
child 6780 92e4c07f86c0
equal deleted inserted replaced
6434:d99b742a9c49 6436:275e9f402ccc
    55             c2 = req.create_entity('Comment', content=u'cubicweb cubicweb', comments=c1)
    55             c2 = req.create_entity('Comment', content=u'cubicweb cubicweb', comments=c1)
    56             c3 = req.create_entity('Comment', content=u'cubicweb cubicweb cubicweb', comments=c1)
    56             c3 = req.create_entity('Comment', content=u'cubicweb cubicweb cubicweb', comments=c1)
    57             self.commit()
    57             self.commit()
    58             self.assertEqual(req.execute('Any X ORDERBY FTIRANK(X) DESC WHERE X has_text "cubicweb"').rows,
    58             self.assertEqual(req.execute('Any X ORDERBY FTIRANK(X) DESC WHERE X has_text "cubicweb"').rows,
    59                               [[c1.eid], [c3.eid], [c2.eid]])
    59                               [[c1.eid], [c3.eid], [c2.eid]])
       
    60 
       
    61 if __name__ == '__main__':
       
    62     from logilab.common.testlib import unittest_main
       
    63     unittest_main()