From 49b878b1b0f2e52bbd5282c22ac32a68e1e8736c Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Tue, 8 Mar 2011 08:18:07 +0000 Subject: Change ATOM and RSS feed representations to use name value pairs instead of just strings, to allow support for all ATOM and RSS attributes and avoid confusion with non-feed string results. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1079292 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/wsgi/server-test.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'sca-cpp/trunk/modules/wsgi/server-test.py') diff --git a/sca-cpp/trunk/modules/wsgi/server-test.py b/sca-cpp/trunk/modules/wsgi/server-test.py index 28f88efefc..610ec05075 100644 --- a/sca-cpp/trunk/modules/wsgi/server-test.py +++ b/sca-cpp/trunk/modules/wsgi/server-test.py @@ -25,14 +25,15 @@ def echo(x): def get(id): if id == ("index.html",): return ("text/plain", ("It works!",)) + if id == (): - return ("Sample Feed", "123456789", - ("Item", "111", (("'name", "Apple"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 2.99))), - ("Item", "222", (("'name", "Orange"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 3.55))), - ("Item", "333", (("'name", "Pear"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 1.55)))) - - entry = (("'name", "Apple"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 2.99)) - return ("Item", id[0], entry) + return (("'feed", ("'title", "Sample Feed"), ("'id", "123456789"), ("'entry", + ((("'title", "Item"), ("'id", "111"), ("'content", ("'item", ("'name", "Apple"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 2.99)))), + (("'title", "Item"), ("'id", "222"), ("'content", ("'item", ("'name", "Orange"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 3.55)))), + (("'title", "Item"), ("'id", "333"), ("'content", ("'item", ("'name", "Pear"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 1.55))))))),) + + content = ("'content", ("'item", ("'name", "Apple"), ("'currencyCode", "USD"), ("'currencySymbol", "$"), ("'price", 2.99))) + return (("'entry", ("'title", "Item"), ("'id", id[0]), content),) def post(collection, item): return ("123456789",) -- cgit v1.2.3