~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Commit current test pass improvements.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
                           )
32
32
import bzrlib.errors as errors
33
33
from bzrlib.tests import TestSkipped
34
 
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer, paramiko_loaded
35
 
 
36
 
 
37
 
class BoundSFTPBranch(TestCaseWithSFTPServer):
 
34
from bzrlib.tests import TestCaseWithTransport
 
35
from bzrlib.transport.local import LocalURLServer
 
36
from bzrlib.transport.memory import MemoryServer
 
37
 
 
38
 
 
39
class BoundSFTPBranch(TestCaseWithTransport):
 
40
 
 
41
    def setUp(self):
 
42
        TestCaseWithTransport.setUp(self)
 
43
        self.vfs_transport_factory = MemoryServer
 
44
        if self.transport_server is LocalURLServer:
 
45
            self.transport_server = None
38
46
 
39
47
    def create_branches(self):
40
48
        self.build_tree(['base/', 'base/a', 'base/b'])
59
67
        self.assertEqual(['r@b-1'], wt_child.branch.revision_history())
60
68
        return b_base, wt_child
61
69
 
62
 
    def tearDown(self):
63
 
        self.sftp_base = None
64
 
        bzrlib.transport.sftp.clear_connection_cache()
65
 
        super(BoundSFTPBranch, self).tearDown()
66
 
 
67
70
    def test_simple_binding(self):
68
71
        self.build_tree(['base/', 'base/a', 'base/b', 'child/'])
69
72
        try:
332
335
    #       performance even when something fails.
333
336
 
334
337
 
335
 
if not paramiko_loaded:
336
 
    del BoundSFTPBranch
337