/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 bzrlib/tests/blackbox/test_shared_repository.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-04-22 17:08:27 UTC
  • mfrom: (5107.3.8 new_branch_and_repo_hooks)
  • Revision ID: pqm@pqm.ubuntu.com-20100422170827-h0bb41yq5nkosu6t
(vila) Add 'post_repo_init', 'post_branch_init' and 'post_switch' hooks. (Marco Pantaleoni)

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
        self.assertRaises(errors.NoRepositoryPresent, dir.open_repository)
139
139
        e = self.assertRaises(errors.NotBranchError, dir.open_branch)
140
140
        self.assertNotContainsRe(str(e), "location is a repository")
 
141
 
 
142
    def test_init_repo_with_post_repo_init_hook(self):
 
143
        calls = []
 
144
        BzrDir.hooks.install_named_hook('post_repo_init', calls.append, None)
 
145
        self.assertLength(0, calls)
 
146
        self.run_bzr("init-repository a")
 
147
        self.assertLength(1, calls)