def test_set_commit_message_hook(self):
     msgeditor.hooks.install_named_hook(
         "set_commit_message",
         lambda commit_obj, existing_message: "save me some typing\n", None)
     commit_obj = commit.Commit()
     self.assertEqual("save me some typing\n",
                      msgeditor.set_commit_message(commit_obj))
Exemple #2
0
 def test_set_commit_message_hook(self):
     msgeditor.hooks.install_named_hook(
         "set_commit_message", lambda commit_obj, existing_message: "save me some typing\n", None
     )
     commit_obj = commit.Commit()
     self.assertEquals("save me some typing\n", msgeditor.set_commit_message(commit_obj))
 def test_set_commit_message_no_hooks(self):
     commit_obj = commit.Commit()
     self.assertIs(None, msgeditor.set_commit_message(commit_obj))
Exemple #4
0
 def test_set_commit_message_no_hooks(self):
     commit_obj = commit.Commit()
     self.assertIs(None, msgeditor.set_commit_message(commit_obj))