Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/tests/mountpoints.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mountpoints.txt')
-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