Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBenjamin Saller <bcsaller@objectrealms.net>2007-08-26 16:46:56 (GMT)
committer Benjamin Saller <bcsaller@objectrealms.net>2007-08-26 16:46:56 (GMT)
commit57e90f572b41d40f9601c50e2d7e63bc47a6279a (patch)
treec76c42019e94ac20378b6dba663272dce805c969 /tests
parentf05bfc05d458fe0897c7bb8febab314fcd38e1c1 (diff)
parentf46c8674cd85aef7dc38d7b70a3de7225a884d51 (diff)
Merge branch 'master' of git+ssh://dev.laptop.org/git/projects/datastore into version_prototype
Conflicts: src/olpc/datastore/backingstore.py
Diffstat (limited to 'tests')
-rw-r--r--tests/mountpoints.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/mountpoints.txt b/tests/mountpoints.txt
index 0f736be..9210906 100644
--- a/tests/mountpoints.txt
+++ b/tests/mountpoints.txt
@@ -173,6 +173,23 @@ The file was properly created in the expected place.
>>> assert os.path.exists('/tmp/store3/one.txt')
+Now let's update that file.
+
+>>> fn = ds.get_filename(u1)
+>>> fp = open(fn, 'w')
+>>> print >>fp, "This is new content"
+>>> fp.close()
+
+>>> ds.update(pen_copy, props, fn)
+>>> ds.complete_indexing()
+
+and verify it worked.
+
+>>> result, count = ds.find(dict(query="new content"))
+>>> assert count == 1
+>>> assert result[0]['uid'] == pen_copy
+
+
We also need to be sure that delete commands work on inplace
mounts. We will delete the object from the datastore and then verify
@@ -198,5 +215,4 @@ verify that we can still remount the store.
>>> mp = ds.mountpoints[mp3]
>>> assert mp.descriptor()['title'] == 'Fake USB from broken'
-
>>> ds.stop(); del ds