~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Martin Pool
  • Date: 2010-04-21 11:27:04 UTC
  • mto: This revision was merged to the branch mainline in revision 5189.
  • Revision ID: mbp@canonical.com-20100421112704-zijso22b6pdevrxy
Simplify various code to use user_url

Show diffs side-by-side

added added

removed removed

Lines of Context:
1339
1339
        url = transport.base
1340
1340
        err = self.assertRaises(errors.BzrError, bzrdir.BzrDir.open, url)
1341
1341
        self.assertEqual('fail', err._preformatted_string)
1342
 
 
1343
 
    def test_post_repo_init(self):
1344
 
        from bzrlib.bzrdir import RepoInitHookParams
1345
 
        calls = []
1346
 
        bzrdir.BzrDir.hooks.install_named_hook('post_repo_init',
1347
 
            calls.append, None)
1348
 
        self.make_repository('foo')
1349
 
        self.assertLength(1, calls)
1350
 
        params = calls[0]
1351
 
        self.assertIsInstance(params, RepoInitHookParams)
1352
 
        self.assertTrue(hasattr(params, 'bzrdir'))
1353
 
        self.assertTrue(hasattr(params, 'repository'))