incubator-heraldry-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?view=rev&rev=493342
Log:
[python-to-heraldry @ Test that message code overwrites value in setArg / add TypeError test
when list of values present in args]

Original author: cygnus@janrain.com
Date: 2006-12-20 22:07:50+00:00

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

Modified: incubator/heraldry/libraries/python/openid/trunk/openid/test/test_message.py
URL: http://svn.apache.org/viewvc/incubator/heraldry/libraries/python/openid/trunk/openid/test/test_message.py?view=diff&rev=493342&r1=493341&r2=493342
==============================================================================
--- incubator/heraldry/libraries/python/openid/trunk/openid/test/test_message.py (original)
+++ incubator/heraldry/libraries/python/openid/trunk/openid/test/test_message.py Fri Jan 
5 21:23:23 2007
@@ -610,6 +610,21 @@
     def test_delArgNS3(self):
         self._test_delArgNS('urn:nothing-significant')
 
+    def test_overwriteExtensionArg(self):
+        ns = 'urn:unittest_extension'
+        key = 'mykey'
+        value_1 = 'value_1'
+        value_2 = 'value_2'
+
+        self.msg.setArg(ns, key, value_1)
+        self.failUnless(self.msg.getArg(ns, key) == value_1)
+        self.msg.setArg(ns, key, value_2)
+        self.failUnless(self.msg.getArg(ns, key) == value_2)
+
+    def test_argList(self):
+        self.failUnlessRaises(TypeError, self.msg.fromPostArgs,
+                              {'arg': [1, 2, 3]})
+
 class MessageTest(unittest.TestCase):
     def setUp(self):
         self.postargs = {



Mime
View raw message