~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_remote.py

  • Committer: Parth Malwankar
  • Date: 2010-07-14 08:53:58 UTC
  • mto: (5050.3.7 2.2)
  • mto: This revision was merged to the branch mainline in revision 5365.
  • Revision ID: parth.malwankar@gmail.com-20100714085358-6un4ny0cn908spkq
better error message for RecursiveBind

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    branch,
31
31
    bzrdir,
32
32
    config,
33
 
    controldir,
34
33
    errors,
35
34
    graph,
36
35
    inventory,
37
36
    inventory_delta,
 
37
    pack,
38
38
    remote,
39
39
    repository,
40
40
    tests,
41
41
    transport,
42
42
    treebuilder,
 
43
    urlutils,
43
44
    versionedfile,
44
45
    )
45
46
from bzrlib.branch import Branch
46
 
from bzrlib.bzrdir import (
47
 
    BzrDir,
48
 
    BzrDirFormat,
49
 
    RemoteBzrProber,
50
 
    )
 
47
from bzrlib.bzrdir import BzrDir, BzrDirFormat
51
48
from bzrlib.remote import (
52
49
    RemoteBranch,
53
50
    RemoteBranchFormat,
54
51
    RemoteBzrDir,
 
52
    RemoteBzrDirFormat,
55
53
    RemoteRepository,
56
54
    RemoteRepositoryFormat,
57
55
    )
91
89
        self.transport = self.get_transport()
92
90
        # make a branch that can be opened over the smart transport
93
91
        self.local_wt = BzrDir.create_standalone_workingtree('.')
94
 
        self.addCleanup(self.transport.disconnect)
 
92
 
 
93
    def tearDown(self):
 
94
        self.transport.disconnect()
 
95
        tests.TestCaseWithTransport.tearDown(self)
95
96
 
96
97
    def test_create_remote_bzrdir(self):
97
98
        b = remote.RemoteBzrDir(self.transport, remote.RemoteBzrDirFormat())
121
122
    def test_find_correct_format(self):
122
123
        """Should open a RemoteBzrDir over a RemoteTransport"""
123
124
        fmt = BzrDirFormat.find_format(self.transport)
124
 
        self.assertTrue(bzrdir.RemoteBzrProber
125
 
                        in controldir.ControlDirFormat._server_probers)
 
125
        self.assertTrue(RemoteBzrDirFormat
 
126
                        in BzrDirFormat._control_server_formats)
126
127
        self.assertIsInstance(fmt, remote.RemoteBzrDirFormat)
127
128
 
128
129
    def test_open_detected_smart_format(self):
685
686
        old.
686
687
        """
687
688
        self.assertRaises(errors.NotBranchError,
688
 
            RemoteBzrProber.probe_transport, OldServerTransport())
 
689
            RemoteBzrDirFormat.probe_transport, OldServerTransport())
689
690
 
690
691
 
691
692
class TestBzrDirCreateBranch(TestRemote):