~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Aaron Bentley
  • Date: 2010-05-10 11:34:20 UTC
  • mfrom: (5218 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5221.
  • Revision ID: aaron@aaronbentley.com-20100510113420-toh2d5yioobb5uq1
Merged bzr.dev into transform-commit-full.

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'))