Index: /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/test_captcha.py
===================================================================
--- /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/test_captcha.py	(revision 7301)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/test_captcha.py	(revision 7302)
@@ -25,5 +25,6 @@
     ICaptchaResponse, ICaptchaRequest, ICaptcha, ICaptchaChooser)
 from waeup.sirp.browser.captcha import (
-    CaptchaResponse, CaptchaRequest, NullCaptcha, StaticCaptcha, CaptchaChooser)
+    CaptchaResponse, CaptchaRequest, NullCaptcha, StaticCaptcha, ReCaptcha,
+    CaptchaChooser)
 
 class CaptchaResponseTests(FunctionalTestCase):
@@ -140,4 +141,42 @@
         return
 
+class ReCaptchaTests(FunctionalTestCase, CaptchaTestBase):
+
+    layer = FunctionalLayer
+
+    factory = ReCaptcha
+    name = 'ReCaptcha'
+
+    def DISABLEDtest_verify(self):
+        # recaptcha verification cannot be tested easily. As the
+        # solution and other environment parameters is only known to
+        # the remote server, we cannot guess on server side what the
+        # solution is.  Further more this test contacts a remote
+        # server so that we might want to disable this test by
+        # default.
+        captcha = self.factory()
+        request1 = TestRequest(
+            form={'recaptcha_challenge_field': 'my-challenge',
+                  'recaptcha_response_field': 'my-solution'})
+        result1 = captcha.verify(request1)
+        self.assertEqual(result1.is_valid, False)
+        self.assertEqual(result1.error_code, 'invalid-request-cookie')
+        return
+
+    def test_display(self):
+        # recaptchas provide the pieces to trigger the remote API
+        captcha = self.factory()
+        result = captcha.display()
+        self.assertMatches(
+            '<script type="text/javascript" src="..."></script>'
+            '<noscript>'
+            '<iframe src="..." height="300" width="500" '
+            '        frameborder="0"></iframe><br />'
+            '<textarea name="recaptcha_challenge_field" rows="3" '
+            '          cols="40"></textarea>'
+            '<input type="hidden" name="recaptcha_response_field" '
+            '       value="manual_challenge" /></noscript>',
+            result)
+        return
 
 class CaptchaChooserTests(FunctionalTestCase):
