From 2dc5393ff2ec740c1d211757ae50ebeabc20aa95 Mon Sep 17 00:00:00 2001 From: tisto Date: Sat, 14 Jan 2012 07:35:59 +0100 Subject: [PATCH] Pep8 --- plone/app/discussion/browser/traversal.py | 3 ++- plone/app/discussion/tests/test_workflow.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/browser/traversal.py b/plone/app/discussion/browser/traversal.py index b27f3cb..e4702aa 100644 --- a/plone/app/discussion/browser/traversal.py +++ b/plone/app/discussion/browser/traversal.py @@ -11,6 +11,7 @@ from zope.publisher.interfaces.browser import IBrowserRequest from plone.app.discussion.interfaces import IConversation + class ConversationNamespace(object): """Allow traversal into a conversation via a ++conversation++name namespace. The name is the name of an adapter from context to @@ -33,6 +34,6 @@ class ConversationNamespace(object): conversation = queryAdapter(self.context, IConversation, name=name) if conversation is None: - raise TraversalError(name) # pragma: no cover + raise TraversalError(name) # pragma: no cover return conversation diff --git a/plone/app/discussion/tests/test_workflow.py b/plone/app/discussion/tests/test_workflow.py index 27d10be..95c8878 100644 --- a/plone/app/discussion/tests/test_workflow.py +++ b/plone/app/discussion/tests/test_workflow.py @@ -64,6 +64,7 @@ class WorkflowSetupTest(unittest.TestCase): def test_reply_to_item_permission(self): pass + class PermissionsSetupTest(unittest.TestCase): """Make sure the permissions are set up properly. """ @@ -124,7 +125,8 @@ class CommentOneStateWorkflowTest(unittest.TestCase): '++conversation++default/%s' % cid) self.portal.acl_users._doAddUser('member', 'secret', ['Member'], []) - self.portal.acl_users._doAddUser('reviewer', 'secret', ['Reviewer'], []) + self.portal.acl_users._doAddUser( + 'reviewer', 'secret', ['Reviewer'], []) self.portal.acl_users._doAddUser('manager', 'secret', ['Manager'], []) self.portal.acl_users._doAddUser('editor', ' secret', ['Editor'], []) self.portal.acl_users._doAddUser('reader', 'secret', ['Reader'], []) @@ -246,5 +248,6 @@ class CommentReviewWorkflowTest(unittest.TestCase): self.assertEqual('pending', self.portal.portal_workflow.\ getInfoFor(self.comment, 'review_state')) + def test_suite(): return unittest.defaultTestLoader.loadTestsFromName(__name__)