~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Get test_remote.BasicRemoteObjectTests.test_open_remote_branch passing by implementing a remote method BzrDir.find_repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
334
334
        branch.nick = "My happy branch"
335
335
        wt.commit('My commit respect da nick.')
336
336
        committed = branch.repository.get_revision(branch.last_revision())
337
 
        self.assertEqual(committed.properties["branch-nick"], 
 
337
        self.assertEqual(committed.properties["branch-nick"],
338
338
                         "My happy branch")
339
339
 
340
340
    def test_create_open_branch_uses_repository(self):
605
605
class TestFormat(TestCaseWithBranch):
606
606
    """Tests for the format itself."""
607
607
 
 
608
    def test_get_reference(self):
 
609
        """get_reference on all regular branches should return None."""
 
610
        if not self.branch_format.is_supported():
 
611
            # unsupported formats are not loopback testable
 
612
            # because the default open will not open them and
 
613
            # they may not be initializable.
 
614
            return
 
615
        made_branch = self.make_branch('.')
 
616
        self.assertEqual(None,
 
617
            made_branch._format.get_reference(made_branch.bzrdir))
 
618
 
608
619
    def test_format_initialize_find_open(self):
609
620
        # loopback test to check the current format initializes to itself.
610
621
        if not self.branch_format.is_supported():