incubator-heraldry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ket...@apache.org
Subject svn commit: r493356 - in /incubator/heraldry/libraries/python/openid/trunk/openid: consumer/discover.py test/test_discover.py
Date Sat, 06 Jan 2007 05:24:37 GMT
Author: keturn
Date: Fri Jan  5 21:24:36 2007
New Revision: 493356

URL: http://svn.apache.org/viewvc?view=rev&rev=493356
Log:
[python-to-heraldry @ Make test_discover check against getLocalID instead of the local_id
attribute]
Also fix bug where canonical ID was being used instead of the local_id

Original author: Josh Hoyt <josh@janrain.com>
Date: 2006-12-21 01:29:14+00:00

Modified:
    incubator/heraldry/libraries/python/openid/trunk/openid/consumer/discover.py
    incubator/heraldry/libraries/python/openid/trunk/openid/test/test_discover.py

Modified: incubator/heraldry/libraries/python/openid/trunk/openid/consumer/discover.py
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/python/openid/trunk/openid/consumer/discover.py?view=diff&rev=493356&r1=493355&r2=493356
==============================================================================
--- incubator/heraldry/libraries/python/openid/trunk/openid/consumer/discover.py (original)
+++ incubator/heraldry/libraries/python/openid/trunk/openid/consumer/discover.py Fri Jan 
5 21:24:36 2007
@@ -84,7 +84,7 @@
         if (self.local_id is self.canonicalID is None):
             return self.claimed_id
         else:
-            return self.canonicalID or self.local_id
+            return self.local_id or self.canonicalID
 
     def isIdentifierSelect(self):
         return self.claimed_id is None

Modified: incubator/heraldry/libraries/python/openid/trunk/openid/test/test_discover.py
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/python/openid/trunk/openid/test/test_discover.py?view=diff&rev=493356&r1=493355&r2=493356
==============================================================================
--- incubator/heraldry/libraries/python/openid/trunk/openid/test/test_discover.py (original)
+++ incubator/heraldry/libraries/python/openid/trunk/openid/test/test_discover.py Fri Jan
 5 21:24:36 2007
@@ -180,9 +180,10 @@
             self.failIf(local_id)
             self.failIf(s.claimed_id)
             self.failIf(s.local_id)
+            self.failIf(s.getLocalID())
         else:
             self.failUnlessEqual(claimed_id, s.claimed_id)
-            self.failUnlessEqual(local_id, s.local_id)
+            self.failUnlessEqual(local_id, s.getLocalID())
 
         if used_yadis:
             self.failUnless(s.used_yadis, "Expected to use Yadis")
@@ -248,7 +249,7 @@
             types=['1.1'],
             server_url="http://www.myopenid.com/server",
             claimed_id=self.id_url,
-            local_id=None,
+            local_id=self.id_url,
             )
 
     def test_html1(self):
@@ -336,7 +337,7 @@
             types=['1.0'],
             server_url="http://www.myopenid.com/server",
             claimed_id=self.id_url,
-            local_id=None,
+            local_id=self.id_url,
             )
 
     def test_yadis2NoLocalID(self):
@@ -352,7 +353,7 @@
             types=['2.0'],
             server_url="http://www.myopenid.com/server",
             claimed_id=self.id_url,
-            local_id=None,
+            local_id=self.id_url,
             )
 
     def test_yadis2(self):



Mime
View raw message