/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/test_extract.py

  • Committer: Jelmer Vernooij
  • Date: 2017-07-30 21:23:44 UTC
  • mto: This revision was merged to the branch mainline in revision 6743.
  • Revision ID: jelmer@jelmer.uk-20170730212344-mumrkz1c4jbm9yzc
review comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2009, 2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from bzrlib import (
 
17
from .. import (
18
18
    branch,
19
 
    bzrdir,
20
19
    errors,
21
20
    )
22
 
from bzrlib.tests import TestCaseWithTransport
 
21
from . import TestCaseWithTransport
23
22
 
24
23
 
25
24
class TestExtract(TestCaseWithTransport):
68
67
    def test_bad_repo_format(self):
69
68
        repo = self.make_repository('branch', shared=True,
70
69
                                    format='knit')
71
 
        a_branch = repo.bzrdir.create_branch()
 
70
        a_branch = repo.controldir.create_branch()
72
71
        self.assertRaises(errors.RootNotRich, self.extract_in_checkout,
73
72
                          a_branch)
74
73
 
75
74
    def test_good_repo_format(self):
76
75
        repo = self.make_repository('branch', shared=True,
77
76
            format='dirstate-with-subtree')
78
 
        a_branch = repo.bzrdir.create_branch()
 
77
        a_branch = repo.controldir.create_branch()
79
78
        wt_b = self.extract_in_checkout(a_branch)
80
 
        self.assertEqual(wt_b.branch.repository.bzrdir.transport.base,
81
 
        repo.bzrdir.transport.base)
 
79
        self.assertEqual(wt_b.branch.repository.controldir.transport.base,
 
80
        repo.controldir.transport.base)