From: Kevan Carstensen Date: Thu, 15 Jul 2010 23:18:20 +0000 (-0700) Subject: test/test_upload.py: changes to test plumbing for #1117 tests X-Git-Tag: allmydata-tahoe-1.7.1~17 X-Git-Url: https://git.rkrishnan.org/vdrive/%22news.html/%5B%5E?a=commitdiff_plain;h=5becaf030916c4d294ee1523ceac9027fdbb6ca9;p=tahoe-lafs%2Ftahoe-lafs.git 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. --- diff --git a/src/allmydata/test/test_upload.py b/src/allmydata/test/test_upload.py index cd2c0b80..f3cabc43 100644 --- a/src/allmydata/test/test_upload.py +++ b/src/allmydata/test/test_upload.py @@ -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,