36
36
class TestNoColocatedSupport(TestCaseWithBzrDir):
38
def test_destroy_colocated_branch(self):
39
branch = self.make_branch('branch')
40
# Colocated branches should not be supported *or*
41
# destroy_branch should not be supported at all
43
(errors.NoColocatedBranchSupport, errors.UnsupportedOperation),
44
branch.bzrdir.destroy_branch, 'colo')
46
def test_create_colo_branch(self):
38
def make_bzrdir_with_repo(self):
47
39
# a bzrdir can construct a branch and repository for itself.
48
40
if not self.bzrdir_format.is_supported():
49
41
# unsupported formats are not loopback testable
53
45
t = get_transport(self.get_url())
54
46
made_control = self.bzrdir_format.initialize(t.base)
55
47
made_repo = made_control.create_repository()
50
def test_destroy_colocated_branch(self):
51
branch = self.make_branch('branch')
52
# Colocated branches should not be supported *or*
53
# destroy_branch should not be supported at all
55
(errors.NoColocatedBranchSupport, errors.UnsupportedOperation),
56
branch.bzrdir.destroy_branch, 'colo')
58
def test_create_colo_branch(self):
59
made_control = self.make_bzrdir_with_repo()
56
60
self.assertRaises(errors.NoColocatedBranchSupport,
57
61
made_control.create_branch, "colo")
63
def test_branch_transport(self):
64
made_control = self.make_bzrdir_with_repo()
65
self.assertRaises(errors.NoColocatedBranchSupport,
66
made_control.get_branch_transport, None, "colo")
68
def test_get_branch_reference(self):
69
made_control = self.make_bzrdir_with_repo()
70
self.assertRaises(errors.NoColocatedBranchSupport,
71
made_control.get_branch_reference, "colo")