~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_branch.py

  • Committer: Vincent Ladeuil
  • Date: 2012-03-08 18:30:33 UTC
  • mfrom: (6487 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6488.
  • Revision ID: v.ladeuil+lp@free.fr-20120308183033-bccqnbr1tpozs711
Merge bzr.dev resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
from bzrlib import (
20
20
    branch as _mod_branch,
21
 
    bzrdir,
 
21
    controldir,
22
22
    config,
23
23
    delta as _mod_delta,
24
24
    errors,
708
708
        self.assertIsInstance(made_branch, _mod_branch.Branch)
709
709
 
710
710
        # find it via bzrdir opening:
711
 
        opened_control = bzrdir.BzrDir.open(readonly_t.base)
 
711
        opened_control = controldir.ControlDir.open(readonly_t.base)
712
712
        direct_opened_branch = opened_control.open_branch()
713
713
        self.assertEqual(direct_opened_branch.__class__, made_branch.__class__)
714
714
        self.assertEqual(opened_control, direct_opened_branch.bzrdir)
849
849
    def test_fallbacks_not_opened(self):
850
850
        stacked = self.make_branch_with_fallback()
851
851
        self.get_transport('').rename('fallback', 'moved')
852
 
        reopened_dir = bzrdir.BzrDir.open(stacked.base)
 
852
        reopened_dir = controldir.ControlDir.open(stacked.base)
853
853
        reopened = reopened_dir.open_branch(ignore_fallbacks=True)
854
854
        self.assertEqual([], reopened.repository._fallback_repositories)
855
855
 
856
856
    def test_fallbacks_are_opened(self):
857
857
        stacked = self.make_branch_with_fallback()
858
 
        reopened_dir = bzrdir.BzrDir.open(stacked.base)
 
858
        reopened_dir = controldir.ControlDir.open(stacked.base)
859
859
        reopened = reopened_dir.open_branch(ignore_fallbacks=False)
860
860
        self.assertLength(1, reopened.repository._fallback_repositories)
861
861