diff options
author | Benjamin Saller <bcsaller@objectrealms.net> | 2007-05-21 21:58:49 (GMT) |
---|---|---|
committer | Benjamin Saller <bcsaller@objectrealms.net> | 2007-05-21 21:58:49 (GMT) |
commit | 99781fa78c5f694e0444ccd006446591cb4d919a (patch) | |
tree | 5f857d69c4e034ec8bfd116b06aeedf6cd01f9df /tests | |
parent | 3b1284a49757cd5b9da9a8e4baf57b2eeab5c791 (diff) |
improved find command -- new API see docstring
Diffstat (limited to 'tests')
-rw-r--r-- | tests/milestone_1.txt | 2 | ||||
-rw-r--r-- | tests/sugar_demo_may17.txt | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/milestone_1.txt b/tests/milestone_1.txt index 143f940..5a426c6 100644 --- a/tests/milestone_1.txt +++ b/tests/milestone_1.txt @@ -37,7 +37,7 @@ Now we should be able to test the first requirement. A find command with out any parameters will return everything in the store. * Get an object from the store given his uid. ->>> first_uid = uids[0] +>>> first_uid = uids[0].keys()[0] >>> c1 = ds.get(first_uid) * Get the object metadata. diff --git a/tests/sugar_demo_may17.txt b/tests/sugar_demo_may17.txt index 0e35b91..0f8cd94 100644 --- a/tests/sugar_demo_may17.txt +++ b/tests/sugar_demo_may17.txt @@ -41,14 +41,13 @@ And retrieve again: >>> fp.close() Get all entries (only have one): ->>> uids = ds.find({}) ->>> for uid in uids: -... properties = ds.get_properties(uid) +>>> results, count = ds.find({}) +>>> for uid, properties in results.iteritems(): ... properties['title'] 'Same entry with some other content' Check content: ->>> fn = ds.get_filename(uids[0]) +>>> fn = ds.get_filename(uid) >>> fp = open(fn, 'r') >>> fp.read() 'some other content\n' |