Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/sugar_demo_may17.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sugar_demo_may17.txt')
-rw-r--r--tests/sugar_demo_may17.txt14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/sugar_demo_may17.txt b/tests/sugar_demo_may17.txt
index f242140..64d49e5 100644
--- a/tests/sugar_demo_may17.txt
+++ b/tests/sugar_demo_may17.txt
@@ -2,7 +2,6 @@ How Sugar will interact with the DS for the May 17th demo in Argentina:
>>> from olpc.datastore import DataStore
>>> from olpc.datastore import backingstore
->>> from testutils import waitforindex
>>> ds = DataStore()
>>> ds.registerBackend(backingstore.FileBackingStore)
>>> assert ds.mount("/tmp/test_ds")
@@ -10,15 +9,16 @@ How Sugar will interact with the DS for the May 17th demo in Argentina:
Create an entry without data:
>>> uid = ds.create(dict(title="New entry"), '')
->>> waitforindex(ds)
+>>> ds.complete_indexing()
>>> ds.get_filename(uid)
''
Update an entry without data:
>>> ds.update(uid, dict(title="New entry still without content"), '')
->>> waitforindex(ds)
-
+
+>>> ds.complete_indexing()
+
>>> ds.get_filename(uid)
''
@@ -27,7 +27,7 @@ Add some data to the same entry:
>>> print >>fp, "some content"
>>> fp.close()
>>> ds.update(uid, dict(title="Same entry now with some content"), fp.name)
->>> waitforindex(ds)
+>>> ds.complete_indexing()
Retrieve that data:
>>> fn = ds.get_filename(uid)
@@ -41,7 +41,7 @@ Update again:
>>> print >>fp, "some other content"
>>> fp.close()
>>> ds.update(uid, dict(title="Same entry with some other content"), fp.name)
->>> waitforindex(ds)
+>>> ds.complete_indexing()
And retrieve again:
>>> fn = ds.get_filename(uid)
@@ -66,7 +66,7 @@ Set content as pdf:
>>> ds.update(uid, dict(title="Same entry with some content in pdf"), 'test.pdf')
>>> ds.update(uid, dict(title="Same entry with some content in doc"), 'test.doc')
>>> ds.update(uid, dict(title="Same entry with some content in odt"), 'test.odt')
->>> waitforindex(ds)
+>>> ds.complete_indexing()
>>> ds.stop()
>>> del ds