mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 21:43:09 +00:00
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:
parent
6d2c216b8f
commit
5becaf0309
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user