[test] update unittest_rqlrewrite to 3.19 api
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 03 Apr 2014 19:55:03 +0200
changeset 9655 2219bd9f35db
parent 9654 f788e5e7e6ea
child 9656 19c423d9d215
[test] update unittest_rqlrewrite to 3.19 api
test/unittest_rqlrewrite.py
--- a/test/unittest_rqlrewrite.py	Thu Apr 03 19:54:54 2014 +0200
+++ b/test/unittest_rqlrewrite.py	Thu Apr 03 19:55:03 2014 +0200
@@ -507,11 +507,12 @@
             args = {}
         querier = self.repo.querier
         union = querier.parse(rql)
-        querier.solutions(self.session, union, args)
-        querier._annotate(union)
-        plan = querier.plan_factory(union, args, self.session)
-        plan.preprocess(union)
-        return union
+        with self.admin_access.repo_cnx() as cnx:
+            querier.solutions(cnx, union, args)
+            querier._annotate(union)
+            plan = querier.plan_factory(union, args, cnx)
+            plan.preprocess(union)
+            return union
 
     def test_ambiguous_optional_same_exprs(self):
         """See #3013535"""