Esempio n. 1
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)
Esempio n. 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))
Esempio n. 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)
Esempio n. 4
0
 def delete_tree(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.delete_tree(relpath))
Esempio n. 5
0
 def get_bytes(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.get_bytes(relpath))
Esempio n. 6
0
 def listable(self):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.listable())
Esempio n. 7
0
 def local_realPath(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.local_realPath(relpath))
Esempio n. 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))
Esempio n. 9
0
 def lock_write(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.lock_write(relpath))
Esempio n. 10
0
 def listable(self):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.listable())
Esempio n. 11
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))
Esempio n. 12
0
 def local_realPath(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.local_realPath(relpath))
Esempio n. 13
0
 def put_file(self, relpath, f, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.put_file(relpath, f, mode))
Esempio n. 14
0
 def open_write_stream(self, relpath, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.open_write_stream(relpath, mode))
Esempio n. 15
0
 def mkdir(self, relpath, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.mkdir(relpath, mode))
Esempio n. 16
0
 def lock_write(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.lock_write(relpath))
Esempio n. 17
0
 def list_dir(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.list_dir(relpath))
Esempio n. 18
0
 def get_bytes(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.get_bytes(relpath))
Esempio n. 19
0
 def iter_files_recursive(self):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.iter_files_recursive())
Esempio n. 20
0
 def rename(self, rel_from, rel_to):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.rename(rel_from, rel_to))
Esempio n. 21
0
 def list_dir(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.list_dir(relpath))
Esempio n. 22
0
 def stat(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.stat(relpath))
Esempio n. 23
0
 def mkdir(self, relpath, mode=None):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.mkdir(relpath, mode))
Esempio n. 24
0
 def writeChunk(self, relpath, offset, data):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.writeChunk(relpath, offset, data))
Esempio n. 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))
Esempio n. 26
0
 def rename(self, rel_from, rel_to):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.rename(rel_from, rel_to))
Esempio n. 27
0
 def writeChunk(self, relpath, offset, data):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.writeChunk(relpath, offset, data))
Esempio n. 28
0
 def iter_files_recursive(self):
     """See `bzrlib.transport.Transport`."""
     return extract_result(
         self._async_transport.iter_files_recursive())
Esempio n. 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))
Esempio n. 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))
Esempio n. 32
0
 def delete_tree(self, relpath):
     """See `bzrlib.transport.Transport`."""
     return extract_result(self._async_transport.delete_tree(relpath))