~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_bound_sftp.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-11 04:02:41 UTC
  • mfrom: (5017.2.2 tariff)
  • Revision ID: pqm@pqm.ubuntu.com-20100211040241-w6n021dz0uus341n
(mbp) add import-tariff tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    errors,
26
26
    tests,
27
27
    )
28
 
from bzrlib.tests import test_server
29
 
from bzrlib.transport import memory
 
28
from bzrlib.transport.local import LocalURLServer
 
29
from bzrlib.transport.memory import MemoryServer
30
30
 
31
31
 
32
32
class BoundSFTPBranch(tests.TestCaseWithTransport):
33
33
 
34
34
    def setUp(self):
35
35
        tests.TestCaseWithTransport.setUp(self)
36
 
        self.vfs_transport_factory = memory.MemoryServer
37
 
        if self.transport_server is test_server.LocalURLServer:
 
36
        self.vfs_transport_factory = MemoryServer
 
37
        if self.transport_server is LocalURLServer:
38
38
            self.transport_server = None
39
39
 
40
40
    def create_branches(self):
144
144
                wt_child2.commit, 'child2', rev_id='r@d-2')
145
145
 
146
146
    def test_unbinding(self):
147
 
        from bzrlib import transport
 
147
        from bzrlib.transport import get_transport
148
148
        b_base, wt_child = self.create_branches()
149
149
 
150
150
        # TestCaseWithSFTPServer only allows you to connect one time
151
151
        # to the SFTP server. So we have to create a connection and
152
152
        # keep it around, so that it can be reused
153
 
        __unused_t = transport.get_transport(self.get_url('.'))
 
153
        __unused_t = get_transport(self.get_url('.'))
154
154
 
155
155
        wt_base = b_base.bzrdir.open_workingtree()
156
156
        open('base/a', 'wb').write('new base contents\n')