/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/http_utils.py

Merge sftp-leaks into catch-them-all

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    errors,
29
29
    osutils,
30
30
    tests,
31
 
    )
32
 
from bzrlib.smart import medium, protocol
 
31
    transport,
 
32
    )
 
33
from bzrlib.smart import (
 
34
    medium,
 
35
    protocol,
 
36
    )
33
37
from bzrlib.tests import http_server
34
 
from bzrlib.transport import (
35
 
    chroot,
36
 
    get_transport,
37
 
    )
 
38
from bzrlib.transport import chroot
38
39
 
39
40
 
40
41
class HTTPServerWithSmarts(http_server.HttpServer):
56
57
 
57
58
    def do_POST(self):
58
59
        """Hand the request off to a smart server instance."""
59
 
        backing = get_transport(self.server.test_case_server._home_dir)
 
60
        backing = transport.get_transport(
 
61
            self.server.test_case_server._home_dir)
60
62
        chroot_server = chroot.ChrootServer(backing)
61
63
        chroot_server.start_server()
62
64
        try:
63
 
            t = get_transport(chroot_server.get_url())
 
65
            t = transport.get_transport(chroot_server.get_url())
64
66
            self.do_POST_inner(t)
65
67
        finally:
66
68
            chroot_server.stop_server()
157
159
        return self._adjust_url(base, relpath)
158
160
 
159
161
    def get_secondary_transport(self, relpath=None):
160
 
        t = get_transport(self.get_secondary_url(relpath))
 
162
        t = transport.get_transport(self.get_secondary_url(relpath))
161
163
        self.assertTrue(t.is_readonly())
162
164
        return t
163
165
 
261
263
        return self._adjust_url(base, relpath)
262
264
 
263
265
   def get_old_transport(self, relpath=None):
264
 
        t = get_transport(self.get_old_url(relpath))
 
266
        t = transport.get_transport(self.get_old_url(relpath))
265
267
        self.assertTrue(t.is_readonly())
266
268
        return t
267
269
 
270
272
        return self._adjust_url(base, relpath)
271
273
 
272
274
   def get_new_transport(self, relpath=None):
273
 
        t = get_transport(self.get_new_url(relpath))
 
275
        t = transport.get_transport(self.get_new_url(relpath))
274
276
        self.assertTrue(t.is_readonly())
275
277
        return t
276
278