diff --git a/plone/app/discussion/browser/comment.py b/plone/app/discussion/browser/comment.py index 03ca3a3..10a94d9 100644 --- a/plone/app/discussion/browser/comment.py +++ b/plone/app/discussion/browser/comment.py @@ -2,6 +2,7 @@ from Acquisition import aq_inner, aq_parent from Products.Five.browser import BrowserView + class View(BrowserView): """Comment View. diff --git a/plone/app/discussion/tests/test_migration.py b/plone/app/discussion/tests/test_migration.py index 117f497..89949d7 100644 --- a/plone/app/discussion/tests/test_migration.py +++ b/plone/app/discussion/tests/test_migration.py @@ -162,7 +162,8 @@ class MigrationTest(unittest.TestCase): [{'comment': comment1, 'depth': 0, 'id': long(comment1.id)}, {'comment': comment1_1, 'depth': 1, 'id': long(comment1_1.id)}, {'comment': comment1_1_1, 'depth': 2, 'id': long(comment1_1_1.id)}, - {'comment': comment1_1_1_1, 'depth': 3, 'id': long(comment1_1_1_1.id)}, + {'comment': comment1_1_1_1, 'depth': 3, + 'id': long(comment1_1_1_1.id)}, {'comment': comment1_2, 'depth': 1, 'id': long(comment1_2.id)}, {'comment': comment1_3, 'depth': 1, 'id': long(comment1_3.id)}, {'comment': comment1_4, 'depth': 1, 'id': long(comment1_4.id)}, diff --git a/plone/app/discussion/vocabularies.py b/plone/app/discussion/vocabularies.py index 86de997..ee1ad28 100644 --- a/plone/app/discussion/vocabularies.py +++ b/plone/app/discussion/vocabularies.py @@ -7,28 +7,28 @@ from plone.app.discussion.interfaces import _ HAS_CAPTCHA = False try: import plone.formwidget.captcha - HAS_CAPTCHA = True # pragma: no cover + HAS_CAPTCHA = True # pragma: no cover except ImportError: pass HAS_RECAPTCHA = False try: import plone.formwidget.recaptcha - HAS_RECAPTCHA = True # pragma: no cover + HAS_RECAPTCHA = True # pragma: no cover except ImportError: pass HAS_AKISMET = False try: import collective.akismet - HAS_AKISMET = True # pragma: no cover + HAS_AKISMET = True # pragma: no cover except ImportError: pass HAS_NOROBOTS = False try: import collective.z3cform.norobots - HAS_NOROBOTS = True # pragma: no cover + HAS_NOROBOTS = True # pragma: no cover except ImportError: pass @@ -43,28 +43,28 @@ def captcha_vocabulary(context): token='disabled', title=_(u'Disabled'))) - if HAS_CAPTCHA: # pragma: no cover + if HAS_CAPTCHA: # pragma: no cover terms.append( SimpleTerm( value='captcha', token='captcha', title='Captcha')) - if HAS_RECAPTCHA: # pragma: no cover + if HAS_RECAPTCHA: # pragma: no cover terms.append( SimpleTerm( value='recaptcha', token='recaptcha', title='ReCaptcha')) - if HAS_AKISMET: # pragma: no cover + if HAS_AKISMET: # pragma: no cover terms.append( SimpleTerm( value='akismet', token='akismet', title='Akismet')) - if HAS_NOROBOTS: # pragma: no cover + if HAS_NOROBOTS: # pragma: no cover terms.append( SimpleTerm( value='norobots', @@ -72,6 +72,7 @@ def captcha_vocabulary(context): title='Norobots')) return SimpleVocabulary(terms) + def text_transform_vocabulary(context): """Vocabulary with all available portal_transform transformations. """