~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_init.py

  • Committer: Patch Queue Manager
  • Date: 2013-05-20 17:46:29 UTC
  • mfrom: (6573.1.1 bzr)
  • Revision ID: pqm@pqm.ubuntu.com-20130520174629-dp7zujtuclvomuzd
(jameinel) Fix CVE 2013-2009. Avoid allowing multiple wildcards in a single
 SSL cert hostname segment. (Andrew Starr-Bochicchio)

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
class TestInit(TestCaseWithTransport):
37
37
 
38
38
    def setUp(self):
39
 
        TestCaseWithTransport.setUp(self)
 
39
        super(TestInit, self).setUp()
40
40
        self._default_label = '2a'
41
41
 
42
42
    def test_init_with_format(self):
48
48
        self.assertIsDirectory('.bzr/checkout/lock', t)
49
49
 
50
50
    def test_init_format_2a(self):
51
 
        """Smoke test for constructing a format 2a repoistory."""
 
51
        """Smoke test for constructing a format 2a repository."""
52
52
        out, err = self.run_bzr('init --format=2a')
53
53
        self.assertEqual("""Created a standalone tree (format: 2a)\n""",
54
54
            out)
55
55
        self.assertEqual('', err)
56
56
 
 
57
    def test_init_colocated(self):
 
58
        """Smoke test for constructing a colocated branch."""
 
59
        out, err = self.run_bzr('init --format=development-colo file:,branch=abranch')
 
60
        self.assertEqual("""Created a lightweight checkout (format: development-colo)\n""",
 
61
            out)
 
62
        self.assertEqual('', err)
 
63
        out, err = self.run_bzr('branches')
 
64
        self.assertEqual("  abranch\n", out)
 
65
        self.assertEqual('', err)
 
66
 
57
67
    def test_init_at_repository_root(self):
58
68
        # bzr init at the root of a repository should create a branch
59
69
        # and working tree even when creation of working trees is disabled.
158
168
 
159
169
    def test_init_default_format_option(self):
160
170
        """bzr init should read default format from option default_format"""
161
 
        conf = _mod_config.GlobalConfig.from_string('''
 
171
        g_store = _mod_config.GlobalStore()
 
172
        g_store._load_from_string('''
162
173
[DEFAULT]
163
174
default_format = 1.9
164
 
''', save=True)
 
175
''')
 
176
        g_store.save()
165
177
        out, err = self.run_bzr_subprocess('init')
166
178
        self.assertContainsRe(out, '1.9')
167
179