# HG changeset patch # User Denis Laxalde # Date 1488810136 -3600 # Node ID 26453d9467f6996997949c7261320eeccaa5c823 # Parent 89611a994572eca877d7594f0c6fdd555ab7cba2 [test] Make unittest_serverctl.py flake8-clean diff -r 89611a994572 -r 26453d9467f6 cubicweb/server/test/unittest_serverctl.py --- a/cubicweb/server/test/unittest_serverctl.py Mon Mar 06 13:15:51 2017 +0100 +++ b/cubicweb/server/test/unittest_serverctl.py Mon Mar 06 15:22:16 2017 +0100 @@ -3,14 +3,19 @@ from cubicweb import ExecutionError from cubicweb.devtools import testlib, ApptestConfiguration -from cubicweb.server.serverctl import _local_dump, DBDumpCommand, SynchronizeSourceCommand +from cubicweb.server.serverctl import DBDumpCommand, SynchronizeSourceCommand from cubicweb.server.serverconfig import ServerConfiguration + class ServerCTLTC(testlib.CubicWebTC): + def setUp(self): super(ServerCTLTC, self).setUp() self.orig_config_for = ServerConfiguration.config_for - config_for = lambda appid: ApptestConfiguration(appid, __file__) + + def config_for(appid): + return ApptestConfiguration(appid, __file__) + ServerConfiguration.config_for = staticmethod(config_for) def tearDown(self): diff -r 89611a994572 -r 26453d9467f6 flake8-ok-files.txt --- a/flake8-ok-files.txt Mon Mar 06 13:15:51 2017 +0100 +++ b/flake8-ok-files.txt Mon Mar 06 15:22:16 2017 +0100 @@ -47,6 +47,7 @@ cubicweb/server/test/data-schema2sql/__init__.py cubicweb/server/test/unittest_checkintegrity.py cubicweb/server/test/unittest_ldapsource.py +cubicweb/server/test/unittest_serverctl.py cubicweb/server/test/unittest_session.py cubicweb/server/test/unittest_rqlannotation.py cubicweb/sobjects/test/unittest_notification.py