~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin
  • Date: 2010-05-16 15:18:43 UTC
  • mfrom: (5235 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5239.
  • Revision ID: gzlist@googlemail.com-20100516151843-lu53u7caehm3ie3i
Merge bzr.dev to resolve conflicts in NEWS and _chk_map_pyx

Show diffs side-by-side

added added

removed removed

Lines of Context:
668
668
        this_branch = self.make_branch('this')
669
669
        other_branch = self.make_branch('other')
670
670
        try:
671
 
            this_branch._format.set_reference(this_branch.bzrdir, other_branch)
 
671
            this_branch._format.set_reference(this_branch.bzrdir, None,
 
672
                other_branch)
672
673
        except NotImplementedError:
673
674
            # that's ok
674
675
            pass
988
989
        merger.do_merge()
989
990
        self.assertEqual('../branch/reference',
990
991
                         tree.branch.get_reference_info('file-id')[1])
 
992
 
 
993
 
 
994
class TestBranchControlComponent(per_branch.TestCaseWithBranch):
 
995
    """Branch implementations adequately implement ControlComponent."""
 
996
    
 
997
    def test_urls(self):
 
998
        br = self.make_branch('branch')
 
999
        self.assertIsInstance(br.user_url, str)
 
1000
        self.assertEqual(br.user_url, br.user_transport.base)
 
1001
        # for all current bzrdir implementations the user dir must be 
 
1002
        # above the control dir but we might need to relax that?
 
1003
        self.assertEqual(br.control_url.find(br.user_url), 0)
 
1004
        self.assertEqual(br.control_url, br.control_transport.base)