summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/wsgi/client-test.py
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-10-25 03:18:16 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-10-25 03:18:16 +0000
commita2a2cb76e9582af32b6803be7fa99af074dc04ae (patch)
treed0ef504321e72fe16afd23f385f20386530f5dfc /sca-cpp/trunk/modules/wsgi/client-test.py
parent0dd33c3859618f3a385583d7344230f0e1eb1004 (diff)
Support python method invocation style on references, ref.func(...) in addition to ref('func', ...). Minor cleanup of the various samples, renamed gettotal to total and getcatalog to items, for consistency with the python sample.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1026939 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/modules/wsgi/client-test.py')
-rw-r--r--sca-cpp/trunk/modules/wsgi/client-test.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/sca-cpp/trunk/modules/wsgi/client-test.py b/sca-cpp/trunk/modules/wsgi/client-test.py
index 47e6cf4bda..867222e792 100644
--- a/sca-cpp/trunk/modules/wsgi/client-test.py
+++ b/sca-cpp/trunk/modules/wsgi/client-test.py
@@ -15,21 +15,26 @@
# specific language governing permissions and limitations
# under the License.
+import unittest
+
# JSON-RPC test case
def echo(x, ref):
- return ref("echo", x)
+ e1 = ref("echo", x)
+ e2 = ref.echo(x)
+ assert e1 == e2
+ return e1
# ATOMPub test case
def get(id, ref):
- return ref("get", id)
+ return ref.get(id)
def post(collection, item, ref):
- return ref("post", collection, item)
+ return ref.post(collection, item)
def put(id, item, ref):
- return ref("put", id, item)
+ return ref.put(id, item)
def delete(id, ref):
- return ref("delete", id)
+ return ref.delete(id)