~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: Vincent Ladeuil
  • Date: 2011-06-27 15:42:09 UTC
  • mfrom: (5993 +trunk)
  • mto: (5993.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5994.
  • Revision ID: v.ladeuil+lp@free.fr-20110627154209-azubuhbuxsz109hq
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
344
344
        self.assertRaises(errors.BadCommitMessageEncoding,
345
345
                          msgeditor.edit_commit_message, '')
346
346
 
 
347
    def test_set_commit_message_no_hooks(self):
 
348
        commit_obj = commit.Commit()
 
349
        self.assertIs(None,
 
350
            msgeditor.set_commit_message(commit_obj))
 
351
 
 
352
    def test_set_commit_message_hook(self):
 
353
        msgeditor.hooks.install_named_hook("set_commit_message",
 
354
                lambda commit_obj, existing_message: "save me some typing\n", None)
 
355
        commit_obj = commit.Commit()
 
356
        self.assertEquals("save me some typing\n",
 
357
            msgeditor.set_commit_message(commit_obj))
 
358
 
347
359
    def test_generate_commit_message_template_no_hooks(self):
348
360
        commit_obj = commit.Commit()
349
361
        self.assertIs(None,