~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_msgeditor.py

  • Committer: INADA Naoki
  • Date: 2011-05-17 00:45:09 UTC
  • mfrom: (5875 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5891.
  • Revision ID: songofacandy@gmail.com-20110517004509-q58negjbdjh7t6u1
merge from lp:bzr

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
 
 
359
347
    def test_generate_commit_message_template_no_hooks(self):
360
348
        commit_obj = commit.Commit()
361
349
        self.assertIs(None,