summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/test/store-python/store.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/test/store-python/store.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/sca-cpp/trunk/test/store-python/store.py b/sca-cpp/trunk/test/store-python/store.py
new file mode 100644
index 0000000000..942544a3b2
--- /dev/null
+++ b/sca-cpp/trunk/test/store-python/store.py
@@ -0,0 +1,30 @@
+# Store implementation
+
+def post(item, catalog, shoppingCart, shoppingTotal):
+ return shoppingCart("post", item)
+
+def getall(catalog, shoppingCart, shoppingTotal):
+ return shoppingCart("getall")
+
+def get(id, catalog, shoppingCart, shoppingTotal):
+ return shoppingCart("get", id)
+
+def getcatalog(catalog, shoppingCart, shoppingTotal):
+ return catalog("get")
+
+def gettotal(catalog, shoppingCart, shoppingTotal):
+ return shoppingCart("gettotal")
+
+def deleteall(catalog, shoppingCart, shoppingTotal):
+ return shoppingCart("deleteall")
+
+def delete(id, catalog, shoppingCart, shoppingTotal):
+ return shoppingCart("delete", id)
+
+# TODO remove these JSON-RPC specific functions
+def system.listMethods(catalog, shoppingCart, shoppingTotal):
+ return ("Service.get", "Service.getTotal")
+
+Service.getCatalog = getcatalog
+Service.getTotal = gettotal
+