From 5becaf030916c4d294ee1523ceac9027fdbb6ca9 Mon Sep 17 00:00:00 2001
From: Kevan Carstensen <kevan@isnotajoke.com>
Date: Thu, 15 Jul 2010 16:18:20 -0700
Subject: [PATCH] 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.
---
 src/allmydata/test/test_upload.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

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,
-- 
2.45.2