def test_callRemote_calls_attribute(self):
     class ExampleProxy:
         def ok(self, a, b, c=None):
             return (c, b, a)
     proxy = DeferredBlockingProxy(ExampleProxy())
     d = proxy.callRemote('ok', 2, 3, c=8)
     result = extract_result(d)
     self.assertEqual((8, 3, 2), result)
Exemple #2
0
 def readv(self,
           relpath,
           offsets,
           adjust_for_latency=False,
           upper_limit=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.readv(relpath, offsets, adjust_for_latency,
                                     upper_limit))
Exemple #3
0
    def test_callRemote_calls_attribute(self):
        class ExampleProxy:
            def ok(self, a, b, c=None):
                return (c, b, a)

        proxy = DeferredBlockingProxy(ExampleProxy())
        d = proxy.callRemote('ok', 2, 3, c=8)
        result = extract_result(d)
        self.assertEqual((8, 3, 2), result)
Exemple #4
0
 def delete_tree(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.delete_tree(relpath))
 def get_bytes(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.get_bytes(relpath))
 def listable(self):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.listable())
Exemple #7
0
 def local_realPath(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.local_realPath(relpath))
Exemple #8
0
 def open_write_stream(self, relpath, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.open_write_stream(relpath, mode))
Exemple #9
0
 def lock_write(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.lock_write(relpath))
Exemple #10
0
 def listable(self):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.listable())
 def readv(self, relpath, offsets, adjust_for_latency=False,
           upper_limit=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.readv(
             relpath, offsets, adjust_for_latency, upper_limit))
 def local_realPath(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.local_realPath(relpath))
 def put_file(self, relpath, f, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.put_file(relpath, f, mode))
 def open_write_stream(self, relpath, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.open_write_stream(relpath, mode))
 def mkdir(self, relpath, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.mkdir(relpath, mode))
 def lock_write(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.lock_write(relpath))
 def list_dir(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.list_dir(relpath))
Exemple #18
0
 def get_bytes(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.get_bytes(relpath))
Exemple #19
0
 def iter_files_recursive(self):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.iter_files_recursive())
 def rename(self, rel_from, rel_to):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.rename(rel_from, rel_to))
Exemple #21
0
 def list_dir(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.list_dir(relpath))
 def stat(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.stat(relpath))
Exemple #23
0
 def mkdir(self, relpath, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.mkdir(relpath, mode))
 def writeChunk(self, relpath, offset, data):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.writeChunk(relpath, offset, data))
Exemple #25
0
 def put_file(self, relpath, f, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.put_file(relpath, f, mode))
Exemple #26
0
 def rename(self, rel_from, rel_to):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.rename(rel_from, rel_to))
Exemple #27
0
 def writeChunk(self, relpath, offset, data):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.writeChunk(relpath, offset, data))
 def iter_files_recursive(self):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.iter_files_recursive())
Exemple #29
0
 def stat(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.stat(relpath))
 def test_success(self):
     # extract_result on a Deferred that has a result returns the result.
     val = self.factory.getUniqueString()
     deferred = defer.succeed(val)
     self.assertEqual(val, extract_result(deferred))
Exemple #31
0
 def test_success(self):
     # extract_result on a Deferred that has a result returns the result.
     val = self.factory.getUniqueString()
     deferred = defer.succeed(val)
     self.assertEqual(val, extract_result(deferred))
 def delete_tree(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.delete_tree(relpath))