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 7294)
+++ /main/waeup.sirp/trunk/src/waeup/sirp/browser/tests/test_captcha.py	(revision 7295)
@@ -25,5 +25,5 @@
     ICaptchaResponse, ICaptchaRequest, ICaptcha, ICaptchaChooser)
 from waeup.sirp.browser.captcha import (
-    CaptchaResponse, CaptchaRequest, NullCaptcha, CaptchaChooser)
+    CaptchaResponse, CaptchaRequest, NullCaptcha, IdCaptcha, CaptchaChooser)
 
 class CaptchaResponseTests(FunctionalTestCase):
@@ -101,7 +101,36 @@
         return
 
-class TestCaptchaTests(FunctionalTestCase):
-
-    layer = FunctionalLayer
+class IdCaptchaTests(FunctionalTestCase, CaptchaTestBase):
+
+    layer = FunctionalLayer
+
+    factory = IdCaptcha
+    name = 'Testing captcha'
+
+    def test_verify(self):
+        # id captchas accept any solution that matches challenge and
+        # is not empty or None
+        captcha = self.factory()
+        result1 = captcha.verify(CaptchaRequest('my-sol', 'my-challenge'))
+        result2 = captcha.verify(CaptchaRequest(None, None))
+        result3 = captcha.verify(CaptchaRequest('', ''))
+        result4 = captcha.verify(CaptchaRequest('my-sol', 'my-sol'))
+        self.assertEqual(result1.is_valid, False)
+        self.assertEqual(result2.is_valid, False)
+        self.assertEqual(result3.is_valid, False)
+        self.assertEqual(result4.is_valid, True)
+        return
+
+    def test_display(self):
+        # id captchas provide a simple HTML input
+        captcha = self.factory()
+        result = captcha.display()
+        self.assertMatches(
+            '<input type="hidden" name="challenge"'
+            '      value="..." /><br />Type: ...<br />'
+            '<input type="text" name="solution" /><br />',
+            result)
+        return
+
 
 class CaptchaChooserTests(FunctionalTestCase):
