Commits

iElectric  committed 72a7095

use basestring to check for valid API errors

  • Participants
  • Parent commits 1f681ea

Comments (0)

Files changed (1)

File repoze/who/plugins/test_captcha.py

         plugin.authenticate(environ, environ['repoze.who.plugins']['cookie'])
 
         app = environ['repoze.who.application']
-        self.assertEqual(environ['repoze.who.error'], 'incorrect-captcha-sol')
+        self.assert_(isinstance(environ['repoze.who.error'], basestring))
         self.assertEqual(app.code, 401)
 
     # it's an irony to test against successive match, right? Maybe add selenium test.
         plugin.authenticate(environ, environ['repoze.who.plugins']['cookie'])
 
         app = environ['repoze.who.application']
-        self.assertEqual(environ['repoze.who.error'], 'incorrect-captcha-sol')
+        self.assert_(isinstance(environ['repoze.who.error'], basestring))
         self.assertEqual(app.code, 401)