[rql2sql/test] Remove dead setUpModule tearDownModule
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 15 Sep 2017 16:31:33 +0200
changeset 12236 75a6b2f40c44
parent 12235 03b94c9863de
child 12237 2dd0dcb2e5f9
[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.
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')