incubator-heraldry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ket...@apache.org
Subject svn commit: r493378 - /incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py
Date Sat, 06 Jan 2007 05:26:18 GMT
Author: keturn
Date: Fri Jan  5 21:26:17 2007
New Revision: 493378

URL: http://svn.apache.org/viewvc?view=rev&rev=493378
Log:
[python-to-heraldry @ Test that OpenID 1 responses will fail if the nonce is missing, even]
if there is a valid OpenID-2-style nonce.

Original author: Josh Hoyt <josh@janrain.com>
Date: 2006-12-27 00:38:14+00:00

Modified:
    incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py

Modified: incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py?view=diff&rev=493378&r1=493377&r2=493378
==============================================================================
--- incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py (original)
+++ incubator/heraldry/libraries/python/openid/trunk/openid/test/test_consumer.py Fri Jan
 5 21:26:17 2007
@@ -679,6 +679,16 @@
         self.failUnlessEqual(ret.identity_url, self.consumer_id)
 
 
+    def test_serverNonceOpenID1(self):
+        """OpenID 1 does not use server-generated nonce"""
+        self.response = mkSuccess(self.endpoint,
+                                  {'ns':OPENID1_NS,
+                                   'return_to': 'http://return.to/',
+                                   'response_nonce': mkNonce(),})
+        ret = self.consumer._checkNonce(self.server_url, self.response)
+        self.failUnlessEqual(ret.status, FAILURE)
+        self.failUnless(ret.message.startswith('Nonce missing from return_to'))
+
     def test_badNonce(self):
         """remove the nonce from the store"""
         nonce = mkNonce()



Mime
View raw message