plone.resourceeditor/master: Fixed pep8 bugs.

Oshane Bailey <jenkins-z4DKO/[email protected]>
Newsgroups gmane.comp.web.zope.plone.cvs
Message-ID <[email protected]>
Repository: plone.resourceeditor
Branch: refs/heads/master
Date: 2017-07-06T17:40:18Z
Author: Oshane Bailey (b4oshany) <[email protected]>
Commit: https://github.com/plone/plone.resourceeditor/commit/a64cd4fdbdaa7417f9aab7c041321c855acec489

Fixed pep8 bugs.

Files changed:
M plone/resourceeditor/browser.py
M plone/resourceeditor/tests/test_file_manager_action.py

diff --git a/plone/resourceeditor/browser.py b/plone/resourceeditor/browser.py
index 3563cdb..d83a29a 100644
--- a/plone/resourceeditor/browser.py
+++ b/plone/resourceeditor/browser.py
@@ -174,7 +174,7 @@ def getInfo(self, obj, path='/'):
             size = obj.get_size() / 1024
 
         if IResourceDirectory.providedBy(obj):
-            fileType = "dir"
+            fileType = 'dir'
             is_folder = True
         else:
             fileType = self.getExtension(obj)
diff --git a/plone/resourceeditor/tests/test_file_manager_action.py b/plone/resourceeditor/tests/test_file_manager_action.py
index 3d5dfda..99fd92a 100644
--- a/plone/resourceeditor/tests/test_file_manager_action.py
+++ b/plone/resourceeditor/tests/test_file_manager_action.py
@@ -24,9 +24,8 @@ def test_getinfo(self):
 
         r.writeFile('test.txt', 'A text file')
         view = FileManagerActions(r, self.layer['request'])
-        info = view.getInfo(r["test.txt"])
-        
-        
+        info = view.getInfo(r['test.txt'])
+
         self.assertEqual(info['fileType'], 'txt')
         self.assertEqual(info['filename'], 'test.txt')
         self.assertEqual(info['path'], '/')
@@ -121,7 +120,6 @@ def test_addfolder_invalid_parent(self):
 
     def test_add(self):
         from plone.resourceeditor.browser import FileManagerActions
-        from StringIO import StringIO
         r = self._make_directory()
 
         view = FileManagerActions(r, self.layer['request'])
@@ -139,7 +137,6 @@ def test_add(self):
 
     def test_add_subfolder(self):
         from plone.resourceeditor.browser import FileManagerActions
-        from StringIO import StringIO
         r = self._make_directory()
         r.makeDirectory('alpha')
 
@@ -158,7 +155,6 @@ def test_add_subfolder(self):
 
     def test_add_exists(self):
         from plone.resourceeditor.browser import FileManagerActions
-        from StringIO import StringIO
         r = self._make_directory()
         r.writeFile('test.txt', 'boo')
 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.