~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_controldir_colo/test_unsupported.py

merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
and attributes colocated branch support added should fail in known ways.
21
21
"""
22
22
 
23
 
from bzrlib import errors
 
23
from bzrlib import (
 
24
    errors,
 
25
    tests,
 
26
    transport,
 
27
    )
24
28
from bzrlib.tests import (
25
 
    TestNotApplicable,
26
 
    )
27
 
from bzrlib.transport import (
28
 
    get_transport,
29
 
    )
30
 
 
31
 
from bzrlib.tests.per_controldir_colo import (
32
 
    TestCaseWithControlDir,
33
 
    )
34
 
 
35
 
 
36
 
class TestNoColocatedSupport(TestCaseWithControlDir):
 
29
    per_controldir,
 
30
    )
 
31
 
 
32
 
 
33
class TestNoColocatedSupport(per_controldir.TestCaseWithControlDir):
37
34
 
38
35
    def make_bzrdir_with_repo(self):
39
36
        # a bzrdir can construct a branch and repository for itself.
41
38
            # unsupported formats are not loopback testable
42
39
            # because the default open will not open them and
43
40
            # they may not be initializable.
44
 
            raise TestNotApplicable('Control dir format not supported')
45
 
        t = get_transport(self.get_url())
 
41
            raise tests.TestNotApplicable('Control dir format not supported')
 
42
        t = self.get_transport()
46
43
        made_control = self.bzrdir_format.initialize(t.base)
47
44
        made_repo = made_control.create_repository()
48
45
        return made_control
60
57
        self.assertRaises(errors.NoColocatedBranchSupport, 
61
58
            made_control.create_branch, "colo")
62
59
 
63
 
    def test_branch_transport(self):
 
60
    def test_open_branch(self):
64
61
        made_control = self.make_bzrdir_with_repo()
65
62
        self.assertRaises(errors.NoColocatedBranchSupport,
66
 
            made_control.get_branch_transport, None, "colo")
 
63
            made_control.open_branch, name="colo")
67
64
 
68
65
    def test_get_branch_reference(self):
69
66
        made_control = self.make_bzrdir_with_repo()