~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-26 10:49:57 UTC
  • mfrom: (4987.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100126104957-dmtqnc0pckuruyla
(vila,
        jam) Implement TestCase.overrideAttr to simplify tests setUp/cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
360
360
            msgeditor.generate_commit_message_template(commit_obj))
361
361
 
362
362
    def test_generate_commit_message_template_hook(self):
363
 
        def restoreDefaults():
364
 
            msgeditor.hooks['commit_message_template'] = []
365
 
        self.addCleanup(restoreDefaults)
366
363
        msgeditor.hooks.install_named_hook("commit_message_template",
367
364
                lambda commit_obj, msg: "save me some typing\n", None)
368
365
        commit_obj = commit.Commit()