incubator-heraldry-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?view=rev&rev=493396
Log:
[python-to-heraldry @ Move CatchLogs from test_consumer to support]

Original author: cygnus@janrain.com
Date: 2006-12-27 23:39:30+00:00

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

Modified: incubator/heraldry/libraries/python/openid/trunk/openid/test/support.py
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/python/openid/trunk/openid/test/support.py?view=diff&rev=493396&r1=493395&r2=493396
==============================================================================
--- incubator/heraldry/libraries/python/openid/trunk/openid/test/support.py (original)
+++ incubator/heraldry/libraries/python/openid/trunk/openid/test/support.py Fri Jan  5 21:27:42
2007
@@ -1,4 +1,5 @@
 from openid import message
+from openid import oidutil
 
 class OpenIDTestMixin(object):
     def failUnlessOpenIDValueEquals(self, msg, key, expected, ns=None):
@@ -18,3 +19,14 @@
         error_message = 'openid.%s unexpectedly present: %s' % (key, actual)
         self.failIf(actual is not None, error_message)
 
+class CatchLogs(object):
+    def setUp(self):
+        self.old_logger = oidutil.log
+        oidutil.log = self.gotLogMessage
+        self.messages = []
+
+    def gotLogMessage(self, message):
+        self.messages.append(message)
+
+    def tearDown(self):
+        oidutil.log = self.old_logger

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=493396&r1=493395&r2=493396
==============================================================================
--- 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:27:42 2007
@@ -24,6 +24,8 @@
 from openid.fetchers import HTTPResponse, HTTPFetchingError
 from openid import fetchers
 
+from support import CatchLogs
+
 import _memstore
 
 assocs = [
@@ -86,24 +88,6 @@
 class GoodAssocStore(_memstore.MemoryStore):
     def getAssociation(self, server_url, handle=None):
         return GoodAssociation()
-
-
-
-class CatchLogs(object):
-
-    def setUp(self):
-        self.old_logger = oidutil.log
-        oidutil.log = self.gotLogMessage
-        self.messages = []
-
-
-    def gotLogMessage(self, message):
-        self.messages.append(message)
-
-
-    def tearDown(self):
-        oidutil.log = self.old_logger
-
 
 
 class TestFetcher(object):



Mime
View raw message