[autopep8] E731 - Use a def when use do not assign a lambda expression

authorNsukami Patrick <ptrck at nskm dot xyz>
changesetd64df6e9653e
branchdefault
phasepublic
hiddenno
parent revision#48aae07a4cb3 Migrate cube to Python3
child revision#cf47d1d50b45 [autopep8] W391 - Remove trailing blank lines
files modified by this revision
test/test_hooks.py
test/test_ifulltextadapter.py
# HG changeset patch
# User Nsukami Patrick <ptrck at nskm dot xyz>
# Date 1571055796 0
# Mon Oct 14 12:23:16 2019 +0000
# Node ID d64df6e9653e51512829c1d9fbc0bf7b5489eb89
# Parent 48aae07a4cb39e6d25aaa62c237654051b7091d0
[autopep8] E731 - Use a def when use do not assign a lambda expression

diff --git a/test/test_hooks.py b/test/test_hooks.py
@@ -9,11 +9,11 @@
1  class IndexHookTC(testlib.CubicWebTC):
2 
3      def setup_database(self):
4          super(IndexHookTC, self).setup_database()
5          self.orig_config_for = CubicWebConfiguration.config_for
6 -        config_for = lambda appid: self.config  # noqa
7 +        def config_for(appid): return self.config  # noqa
8          CubicWebConfiguration.config_for = staticmethod(config_for)
9          self.config['elasticsearch-locations'] = 'http://nonexistant.elastic.search:9200'
10          self.config['index-name'] = 'unittest_index_name'
11 
12      @patch('elasticsearch.client.indices.IndicesClient.create')
diff --git a/test/test_ifulltextadapter.py b/test/test_ifulltextadapter.py
@@ -13,11 +13,11 @@
13  class IFullTextIndexSerializableTC(testlib.CubicWebTC):
14 
15      def setup_database(self):
16          super(IFullTextIndexSerializableTC, self).setup_database()
17          self.orig_config_for = CubicWebConfiguration.config_for
18 -        config_for = lambda appid: self.config  # noqa
19 +        def config_for(appid): return self.config  # noqa
20          CubicWebConfiguration.config_for = staticmethod(config_for)
21          self.config['elasticsearch-locations'] = 'http://nonexistant.elastic.search:9200'
22          self.config['index-name'] = 'unittest_index_name'
23 
24      @patch('elasticsearch.client.indices.IndicesClient.create')