/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_reference.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 21:59:15 UTC
  • mto: This revision was merged to the branch mainline in revision 6690.
  • Revision ID: jelmer@jelmer.uk-20170610215915-zcpu0in3r1irx3ml
Move serializer to bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
 
from bzrlib import (
19
 
    branch as _mod_branch,
20
 
    bzrdir,
21
 
    )
22
 
from bzrlib.tests import TestCaseWithTransport
 
18
from breezy import (
 
19
    controldir,
 
20
    )
 
21
from breezy.bzr import (
 
22
    branch as _mod_bzrbranch,
 
23
    )
 
24
from breezy.tests import TestCaseWithTransport
23
25
 
24
26
 
25
27
class TestReference(TestCaseWithTransport):
26
28
 
27
 
    def make_branch(self, location, format=None):
28
 
        if format is None:
29
 
            format = bzrdir.format_registry.make_bzrdir('1.9')
30
 
            format.set_branch_format(_mod_branch.BzrBranchFormat8())
31
 
        return TestCaseWithTransport.make_branch(self, location, format=format)
 
29
    def get_default_format(self):
 
30
        format = controldir.format_registry.make_controldir('1.9')
 
31
        format.set_branch_format(_mod_bzrbranch.BzrBranchFormat8())
 
32
        return format
32
33
 
33
34
    def test_no_args_lists(self):
34
35
        branch = self.make_branch('branch')
56
57
    def test_uses_basis_tree_location(self):
57
58
        tree = self.make_tree_with_reference()
58
59
        tree.commit('add newpath')
59
 
        tree.bzrdir.destroy_workingtree()
 
60
        tree.controldir.destroy_workingtree()
60
61
        out, err = self.run_bzr('reference', working_dir='tree')
61
62
        self.assertContainsRe(out, 'newpath http://example.org\n')
62
63
 
85
86
        tree = self.make_branch_and_tree('tree')
86
87
        out, err = self.run_bzr('reference file http://example.org',
87
88
                                working_dir='tree', retcode=3)
88
 
        self.assertEqual('bzr: ERROR: file is not versioned.\n', err)
 
89
        self.assertEqual('brz: ERROR: file is not versioned.\n', err)