[cleanup] Fix flake8 errors in web/application.py and associated test
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 14 Mar 2017 10:34:03 +0100
changeset 12050 1c7be7b62823
parent 12049 2e67aab22219
child 12051 bff3be6eebed
[cleanup] Fix flake8 errors in web/application.py and associated test
cubicweb/web/application.py
cubicweb/web/test/unittest_application.py
flake8-ok-files.txt
--- a/cubicweb/web/application.py	Tue Mar 14 10:33:24 2017 +0100
+++ b/cubicweb/web/application.py	Tue Mar 14 10:34:03 2017 +0100
@@ -18,7 +18,6 @@
 """CubicWeb web client application object"""
 
 
-
 import contextlib
 from functools import wraps
 import json
--- a/cubicweb/web/test/unittest_application.py	Tue Mar 14 10:33:24 2017 +0100
+++ b/cubicweb/web/test/unittest_application.py	Tue Mar 14 10:34:03 2017 +0100
@@ -24,7 +24,7 @@
 from six.moves.http_cookies import SimpleCookie
 
 from logilab.common.testlib import TestCase, unittest_main
-from logilab.common.decorators import clear_cache, classproperty
+from logilab.common.decorators import clear_cache
 
 from cubicweb import view
 from cubicweb.devtools.testlib import CubicWebTC, real_error_handling
@@ -32,7 +32,6 @@
 from cubicweb.web import LogOut, Redirect, INTERNAL_FIELD_VALUE
 from cubicweb.web.views.basecontrollers import ViewController
 from cubicweb.web.application import anonymized_request
-from cubicweb import repoapi
 
 
 class FakeMapping:
@@ -574,13 +573,13 @@
             perm_eid = text_type(perm.eid)
             req.form = {
                 'eid': [dir_eid, perm_eid],
-                '__maineid' : dir_eid,
+                '__maineid': dir_eid,
                 '__type:%s' % dir_eid: 'Directory',
                 '__type:%s' % perm_eid: 'DirectoryPermission',
                 '_cw_entity_fields:%s' % dir_eid: '',
                 '_cw_entity_fields:%s' % perm_eid: 'has_permission-object',
                 'has_permission-object:%s' % perm_eid: '',
-                }
+            }
             path, _params = self.expect_redirect_handle_request(req, 'edit')
             self.assertTrue(req.find('Directory', eid=mydir.eid))
             self.assertFalse(req.find('DirectoryPermission', eid=perm.eid))
--- a/flake8-ok-files.txt	Tue Mar 14 10:33:24 2017 +0100
+++ b/flake8-ok-files.txt	Tue Mar 14 10:34:03 2017 +0100
@@ -89,8 +89,10 @@
 cubicweb/test/unittest_schema.py
 cubicweb/test/unittest_toolsutils.py
 cubicweb/test/unittest_wfutils.py
+cubicweb/web/application.py
 cubicweb/web/formwidgets.py
 cubicweb/web/test/data/entities.py
+cubicweb/web/test/unittest_application.py
 cubicweb/web/test/unittest_http_headers.py
 cubicweb/web/test/unittest_views_basetemplates.py
 cubicweb/web/test/unittest_views_cwsources.py