test/test_upload.py: changes to test plumbing for #1117 tests
authorKevan Carstensen <kevan@isnotajoke.com>
Thu, 15 Jul 2010 23:18:20 +0000 (16:18 -0700)
committerKevan Carstensen <kevan@isnotajoke.com>
Thu, 15 Jul 2010 23:18:20 +0000 (16:18 -0700)
    - Add a callRemoteOnly method to FakeBucketWriter.
    - Change the abort method in FakeBucketWriter to not return a
      RuntimeError.

src/allmydata/test/test_upload.py

index cd2c0b80b9c272528262349bfb80bd7915c79f52..f3cabc437da76e08fd89aff185ac2eff9e664c25 100644 (file)
@@ -158,6 +158,13 @@ class FakeBucketWriter:
         d.addCallback(lambda res: _call())
         return d
 
+
+    def callRemoteOnly(self, methname, *args, **kwargs):
+        d = self.callRemote(methname, *args, **kwargs)
+        del d # callRemoteOnly ignores this
+        return None
+
+
     def remote_write(self, offset, data):
         precondition(not self.closed)
         precondition(offset >= 0)
@@ -172,7 +179,7 @@ class FakeBucketWriter:
         self.closed = True
 
     def remote_abort(self):
-        log.err(RuntimeError("uh oh, I was asked to abort"))
+        pass
 
 class FakeClient:
     DEFAULT_ENCODING_PARAMETERS = {"k":25,