~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2015-12-17 18:39:00 UTC
  • mfrom: (6606.1.2 fix-float)
  • Revision ID: pqm@pqm.ubuntu.com-20151217183900-0719du2uv1kwu3lc
(vila) Inline testtools private method to fix an issue in xenial (the
 private implementation has changed in an backward incompatible way).
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
            raise tests.TestNotApplicable('Control dir format not supported')
41
41
        t = self.get_transport()
42
42
        try:
43
 
            made_control = self.bzrdir_format.initialize(t.base)
 
43
            made_control = self.make_bzrdir('.', format=self.bzrdir_format)
44
44
        except errors.UninitializableFormat:
45
45
            raise tests.TestNotApplicable('Control dir format not initializable')
 
46
        self.assertEquals(made_control._format, self.bzrdir_format)
46
47
        made_repo = made_control.create_repository()
47
48
        return made_control
48
49
 
68
69
        made_control = self.make_bzrdir_with_repo()
69
70
        self.assertRaises(errors.NoColocatedBranchSupport,
70
71
            made_control.get_branch_reference, "colo")
 
72
 
 
73
    def test_set_branch_reference(self):
 
74
        referenced = self.make_branch('referenced')
 
75
        made_control = self.make_bzrdir_with_repo()
 
76
        self.assertRaises(errors.NoColocatedBranchSupport,
 
77
            made_control.set_branch_reference, referenced, name="colo")
 
78
 
 
79
    def test_get_branches(self):
 
80
        made_control = self.make_bzrdir_with_repo()
 
81
        made_control.create_branch()
 
82
        self.assertEqual(made_control.get_branches().keys(),
 
83
                         [""])