# HG changeset patch # User Sylvain Thénault # Date 1505485893 -7200 # Node ID 75a6b2f40c44758fa455e0f2b671c7380502091f # Parent 03b94c9863de5c8b424cc7ae20093ebd576bcc6a [rql2sql/test] Remove dead setUpModule tearDownModule they are overwritten a few lines below , hence this code is dead and not necessary for test success, drop it. diff -r 03b94c9863de -r 75a6b2f40c44 cubicweb/server/test/unittest_rql2sql.py --- a/cubicweb/server/test/unittest_rql2sql.py Fri Sep 15 16:25:51 2017 +0200 +++ b/cubicweb/server/test/unittest_rql2sql.py Fri Sep 15 16:31:33 2017 +0200 @@ -23,7 +23,6 @@ from logilab import database as db from logilab.common.testlib import mock_object -from logilab.common.decorators import monkeypatch from rql import BadRQLQuery from rql import RQLHelper @@ -39,22 +38,6 @@ _orig_select_principal = rqlannotation._select_principal _orig_check_permissions = ExecutionPlan._check_permissions - -def setUpModule(): - """Monkey-patch the SQL generator to ensure solutions order is predictable.""" - global orig_solutions_sql - orig_solutions_sql = rql2sql.SQLGenerator._solutions_sql - - @monkeypatch - def _solutions_sql(self, select, solutions, distinct, needalias): - return orig_solutions_sql(self, select, sorted(solutions), distinct, needalias) - - -def tearDownModule(): - """Remove monkey-patch done in setUpModule""" - rql2sql.SQLGenerator._solutions_sql = orig_solutions_sql - - # add a dumb registered procedure class stockproc(FunctionDescr): supported_backends = ('postgres', 'sqlite', 'mysql')