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

View File

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