~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2016-01-31 13:36:59 UTC
  • mfrom: (6613.1.5 1538480-match-hostname)
  • Revision ID: pqm@pqm.ubuntu.com-20160131133659-ouy92ee2wlv9xz8m
(vila) Use ssl.match_hostname instead of our own. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
 
21
21
from bzrlib.errors import (
 
22
    IncompatibleFormat,
22
23
    UnstackableBranchFormat,
23
24
    )
24
25
from bzrlib.revision import (
25
26
    NULL_REVISION,
26
27
    )
27
28
from bzrlib.tests import (
28
 
    TestCase,
29
29
    TestCaseWithTransport,
30
30
    )
31
31
 
61
61
        branch = self.make_branch()
62
62
        branch.set_parent("foobar")
63
63
 
64
 
    def test_break_lock(self):
65
 
        """Test that break_lock() works, even if it is a no-op."""
66
 
        branch = self.make_branch()
67
 
        branch.break_lock()
68
 
 
69
64
    def test_set_push_location(self):
70
65
        """Test that setting the push location works."""
71
66
        branch = self.make_branch()
129
124
        self.assertEquals((0, NULL_REVISION), branch.last_revision_info())
130
125
 
131
126
 
132
 
class ForeignBranchFormatTests(TestCase):
 
127
class ForeignBranchFormatTests(TestCaseWithTransport):
133
128
    """Basic tests for foreign branch format objects."""
134
129
 
135
130
    branch_format = None # Set to a BranchFormat instance by adapter
140
135
        Remote branches may be initializable on their own, but none currently
141
136
        support living in .bzr/branch.
142
137
        """
143
 
        self.assertRaises(NotImplementedError, self.branch_format.initialize, None)
 
138
        bzrdir = self.make_bzrdir('dir')
 
139
        self.assertRaises(IncompatibleFormat, self.branch_format.initialize, bzrdir)
144
140
 
145
141
    def test_get_format_description_type(self):
146
142
        self.assertIsInstance(self.branch_format.get_format_description(), str)
147
143
 
148
144
    def test_network_name(self):
149
145
        self.assertIsInstance(self.branch_format.network_name(), str)
150
 
 
151