# HG changeset patch # User Sylvain Thénault # Date 1343894951 -7200 # Node ID e2913c9880a007437f43cba2da0ca4c98412fcd7 # Parent e83b4a64ba294afd0dc2702ec6f5a5d10913ceb9 [test rql completion] dont limit number of completion, else we've impredicable results. Also should tell rql.parse to not print error on stdout This repairs test introduced by dcd9bc1d1bca which closes #2439846 diff -r e83b4a64ba29 -r e2913c9880a0 web/test/unittest_magicsearch.py --- a/web/test/unittest_magicsearch.py Wed Aug 01 10:47:27 2012 +0200 +++ b/web/test/unittest_magicsearch.py Thu Aug 02 10:09:11 2012 +0200 @@ -235,7 +235,6 @@ def suggestions(self, rql): req = self.request() rbs = self.vreg['components'].select('rql.suggestions', req) - rbs.attr_value_limit = 10 # limit to 10 to ease vocabulry tests return rbs.build_suggestions(rql) def test_no_restrictions_rql(self): @@ -319,6 +318,11 @@ req.create_entity('Personne', nom=u'n%s' % i, prenom=u'p%s' % i) self.assertListEqual(['Any X WHERE X is Personne, X nom "n0"', 'Any X WHERE X is Personne, X nom "n1"', + 'Any X WHERE X is Personne, X nom "n10"', + 'Any X WHERE X is Personne, X nom "n11"', + 'Any X WHERE X is Personne, X nom "n12"', + 'Any X WHERE X is Personne, X nom "n13"', + 'Any X WHERE X is Personne, X nom "n14"', 'Any X WHERE X is Personne, X nom "n2"', 'Any X WHERE X is Personne, X nom "n3"', 'Any X WHERE X is Personne, X nom "n4"', diff -r e83b4a64ba29 -r e2913c9880a0 web/views/magicsearch.py --- a/web/views/magicsearch.py Wed Aug 01 10:47:27 2012 +0200 +++ b/web/views/magicsearch.py Thu Aug 02 10:09:11 2012 +0200 @@ -1,4 +1,4 @@ -# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. +# copyright 2003-2012 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of CubicWeb. @@ -452,7 +452,7 @@ else: restrictions, incomplete_part = '', restrictions user_rql = variables - select = parse(user_rql).children[0] + select = parse(user_rql, print_errors=False).children[0] req.vreg.rqlhelper.annotate(select) req.vreg.solutions(req, select, {}) if restrictions: