This commit is contained in:
tisto 2012-01-14 07:47:07 +01:00
parent aa36c0bc9b
commit 11e101f7d7
3 changed files with 12 additions and 9 deletions

View File

@ -2,6 +2,7 @@ from Acquisition import aq_inner, aq_parent
from Products.Five.browser import BrowserView from Products.Five.browser import BrowserView
class View(BrowserView): class View(BrowserView):
"""Comment View. """Comment View.

View File

@ -162,7 +162,8 @@ class MigrationTest(unittest.TestCase):
[{'comment': comment1, 'depth': 0, 'id': long(comment1.id)}, [{'comment': comment1, 'depth': 0, 'id': long(comment1.id)},
{'comment': comment1_1, 'depth': 1, 'id': long(comment1_1.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, '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_2, 'depth': 1, 'id': long(comment1_2.id)},
{'comment': comment1_3, 'depth': 1, 'id': long(comment1_3.id)}, {'comment': comment1_3, 'depth': 1, 'id': long(comment1_3.id)},
{'comment': comment1_4, 'depth': 1, 'id': long(comment1_4.id)}, {'comment': comment1_4, 'depth': 1, 'id': long(comment1_4.id)},

View File

@ -7,28 +7,28 @@ from plone.app.discussion.interfaces import _
HAS_CAPTCHA = False HAS_CAPTCHA = False
try: try:
import plone.formwidget.captcha import plone.formwidget.captcha
HAS_CAPTCHA = True # pragma: no cover HAS_CAPTCHA = True # pragma: no cover
except ImportError: except ImportError:
pass pass
HAS_RECAPTCHA = False HAS_RECAPTCHA = False
try: try:
import plone.formwidget.recaptcha import plone.formwidget.recaptcha
HAS_RECAPTCHA = True # pragma: no cover HAS_RECAPTCHA = True # pragma: no cover
except ImportError: except ImportError:
pass pass
HAS_AKISMET = False HAS_AKISMET = False
try: try:
import collective.akismet import collective.akismet
HAS_AKISMET = True # pragma: no cover HAS_AKISMET = True # pragma: no cover
except ImportError: except ImportError:
pass pass
HAS_NOROBOTS = False HAS_NOROBOTS = False
try: try:
import collective.z3cform.norobots import collective.z3cform.norobots
HAS_NOROBOTS = True # pragma: no cover HAS_NOROBOTS = True # pragma: no cover
except ImportError: except ImportError:
pass pass
@ -43,28 +43,28 @@ def captcha_vocabulary(context):
token='disabled', token='disabled',
title=_(u'Disabled'))) title=_(u'Disabled')))
if HAS_CAPTCHA: # pragma: no cover if HAS_CAPTCHA: # pragma: no cover
terms.append( terms.append(
SimpleTerm( SimpleTerm(
value='captcha', value='captcha',
token='captcha', token='captcha',
title='Captcha')) title='Captcha'))
if HAS_RECAPTCHA: # pragma: no cover if HAS_RECAPTCHA: # pragma: no cover
terms.append( terms.append(
SimpleTerm( SimpleTerm(
value='recaptcha', value='recaptcha',
token='recaptcha', token='recaptcha',
title='ReCaptcha')) title='ReCaptcha'))
if HAS_AKISMET: # pragma: no cover if HAS_AKISMET: # pragma: no cover
terms.append( terms.append(
SimpleTerm( SimpleTerm(
value='akismet', value='akismet',
token='akismet', token='akismet',
title='Akismet')) title='Akismet'))
if HAS_NOROBOTS: # pragma: no cover if HAS_NOROBOTS: # pragma: no cover
terms.append( terms.append(
SimpleTerm( SimpleTerm(
value='norobots', value='norobots',
@ -72,6 +72,7 @@ def captcha_vocabulary(context):
title='Norobots')) title='Norobots'))
return SimpleVocabulary(terms) return SimpleVocabulary(terms)
def text_transform_vocabulary(context): def text_transform_vocabulary(context):
"""Vocabulary with all available portal_transform transformations. """Vocabulary with all available portal_transform transformations.
""" """