server/test/unittest_rqlannotation.py
branchstable
changeset 8342 7a5271182ef0
parent 7791 31bb51ea5485
child 9675 8aabfefc8a81
equal deleted inserted replaced
8341:af813e7d5daa 8342:7a5271182ef0
     1 # -*- coding: iso-8859-1 -*-
     1 # -*- coding: iso-8859-1 -*-
     2 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     3 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     4 #
     4 #
     5 # This file is part of CubicWeb.
     5 # This file is part of CubicWeb.
     6 #
     6 #
     7 # CubicWeb is free software: you can redistribute it and/or modify it under the
     7 # CubicWeb is free software: you can redistribute it and/or modify it under the
   348     def test_remove_from_deleted_source_2(self):
   348     def test_remove_from_deleted_source_2(self):
   349         rqlst = self._prepare('Note X WHERE X eid IN (999998, 999999), NOT X cw_source Y')
   349         rqlst = self._prepare('Note X WHERE X eid IN (999998, 999999), NOT X cw_source Y')
   350         self.assertEqual(rqlst.defined_vars['X']._q_invariant, False)
   350         self.assertEqual(rqlst.defined_vars['X']._q_invariant, False)
   351         self.assertEqual(rqlst.defined_vars['Y']._q_invariant, True)
   351         self.assertEqual(rqlst.defined_vars['Y']._q_invariant, True)
   352 
   352 
       
   353 
       
   354     def test_has_text_security_cache_bug(self):
       
   355         rqlst = self._prepare('Any X WHERE X has_text "toto" WITH X BEING '
       
   356                               '(Any C WHERE C is Societe, C nom CS)')
       
   357         self.assertTrue(rqlst.parent.has_text_query)
       
   358 
   353 if __name__ == '__main__':
   359 if __name__ == '__main__':
   354     from logilab.common.testlib import unittest_main
   360     from logilab.common.testlib import unittest_main
   355     unittest_main()
   361     unittest_main()