commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r5424 - trunk/gnue-common/src/rpc


From: reinhard
Subject: r5424 - trunk/gnue-common/src/rpc
Date: Sat, 20 Mar 2004 15:18:40 -0600 (CST)

Author: reinhard
Date: 2004-03-20 15:18:40 -0600 (Sat, 20 Mar 2004)
New Revision: 5424

Modified:
   trunk/gnue-common/src/rpc/client.py
   trunk/gnue-common/src/rpc/server.py
Log:
Added parameters to test code.


Modified: trunk/gnue-common/src/rpc/client.py
===================================================================
--- trunk/gnue-common/src/rpc/client.py 2004-03-20 21:17:24 UTC (rev 5423)
+++ trunk/gnue-common/src/rpc/client.py 2004-03-20 21:18:40 UTC (rev 5424)
@@ -191,10 +191,10 @@
 
   obj = connection.request ('test')
 
-  print 'stringtest:', repr (obj.stringtest ())
-  print 'ustringtest:', repr (obj.ustringtest ())
-  print 'inttest:', repr (obj.inttest ())
-  print 'floattest:', repr (obj.floattest ())
+  print 'stringtest:', repr (obj.stringtest ('This'))
+  print 'ustringtest:', (obj.ustringtest (u'\xe0\xe2\xe1\xe4')).encode 
('utf-8')
+  print 'inttest: 21 * 2 =', repr (obj.inttest (21))
+  print 'floattest: 123.45 * 2 =', repr (obj.floattest (123.45))
   print 'datetimetest:', repr (obj.datetimetest ())
   print 'booltest:', repr (obj.booltest ())
   subobj = obj.objtest ()

Modified: trunk/gnue-common/src/rpc/server.py
===================================================================
--- trunk/gnue-common/src/rpc/server.py 2004-03-20 21:17:24 UTC (rev 5423)
+++ trunk/gnue-common/src/rpc/server.py 2004-03-20 21:18:40 UTC (rev 5424)
@@ -248,17 +248,17 @@
 
   class servertest:
 
-    def stringtest (self):
-      return 'This is a string'
+    def stringtest (self, s):
+      return '"%s" is a string' % s
 
-    def ustringtest (self):
-      return u'This is a unicode string with ����'
+    def ustringtest (self, u):
+      return u'"%s" is a unicode string' % u
 
-    def inttest (self):
-      return 21
+    def inttest (self, i):
+      return i * 2
 
-    def floattest (self):
-      return 123.45
+    def floattest (self, f):
+      return f * 2
 
     def datetimetest (self):
       return mx.DateTime.now ()





reply via email to

[Prev in Thread] Current Thread [Next in Thread]