test/test_upload.py: changes to test plumbing for #1117 tests

- Add a callRemoteOnly method to FakeBucketWriter.
    - Change the abort method in FakeBucketWriter to not return a
      RuntimeError.
This commit is contained in:
Kevan Carstensen 2010-07-15 16:18:20 -07:00
parent 6d2c216b8f
commit 5becaf0309

View File

@ -158,6 +158,13 @@ class FakeBucketWriter:
d.addCallback(lambda res: _call()) d.addCallback(lambda res: _call())
return d 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): def remote_write(self, offset, data):
precondition(not self.closed) precondition(not self.closed)
precondition(offset >= 0) precondition(offset >= 0)
@ -172,7 +179,7 @@ class FakeBucketWriter:
self.closed = True self.closed = True
def remote_abort(self): def remote_abort(self):
log.err(RuntimeError("uh oh, I was asked to abort")) pass
class FakeClient: class FakeClient:
DEFAULT_ENCODING_PARAMETERS = {"k":25, DEFAULT_ENCODING_PARAMETERS = {"k":25,