~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_bzrdir/test_bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-12 13:44:20 UTC
  • mfrom: (6358 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6362.
  • Revision ID: jelmer@samba.org-20111212134420-20130h4aa5ewp2m7
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
import bzrlib.branch
23
23
from bzrlib import (
 
24
    branch,
24
25
    bzrdir,
25
26
    errors,
26
27
    repository,
683
684
        self.assertEquals(
684
685
            branch.bzrdir.user_transport.list_dir("."),
685
686
            [".bzr"])
 
687
 
 
688
    def test_get_branches(self):
 
689
        repo = self.make_repository('branch-1')
 
690
        try:
 
691
            target_branch = repo.bzrdir.create_branch(name='foo')
 
692
        except errors.NoColocatedBranchSupport:
 
693
            raise TestNotApplicable('Format does not support colocation')
 
694
        reference = branch.BranchReferenceFormat().initialize(
 
695
            repo.bzrdir, target_branch=target_branch)
 
696
        self.assertEqual(set([None, 'foo']),
 
697
                         set(repo.bzrdir.get_branches().keys()))