simplify (re)captcha test.

svn path=/plone.app.discussion/trunk/; revision=28893
This commit is contained in:
Timo Stollenwerk 2009-08-15 10:18:10 +00:00
parent 4ef604f43f
commit ead8813188
1 changed files with 3 additions and 6 deletions

View File

@ -3,22 +3,19 @@ from zope import component
import zope.schema.interfaces import zope.schema.interfaces
import zope.schema.vocabulary import zope.schema.vocabulary
# XXX: REPLACE THIS!!!
HAS_CAPTCHA=False HAS_CAPTCHA=False
HAS_RECAPTCHA=False
try: try:
from plone.formwidget.captcha.widget import CaptchaFieldWidget import plone.formwidget.captcha
HAS_CAPTCHA = True HAS_CAPTCHA = True
except ImportError: except ImportError:
pass pass
HAS_RECAPTCHA=False
try: try:
from plone.formwidget.captcha.widget import ReCaptchaFieldWidget import plone.formwidget.recaptcha
HAS_RECAPTCHA = True HAS_RECAPTCHA = True
except ImportError: except ImportError:
pass pass
# XXX: REPLACE THIS!!!
def captcha_vocabulary(context): def captcha_vocabulary(context):
"""Vocabulary with all available captcha implementations. """Vocabulary with all available captcha implementations.