def test_commit_template_encoded(self): """Test building a commit message template""" working_tree = self.make_uncommitted_tree() template = make_commit_message_template_encoded(working_tree, None, output_encoding='utf8') self.assertEqualDiff(template, u"""\ added: hell\u00d8 """.encode("utf8"))
def test_commit_template_and_diff(self): """Test building a commit message template""" working_tree = self.make_uncommitted_tree() template = make_commit_message_template_encoded(working_tree, None, diff=True, output_encoding='utf8') self.assertTrue("""\ @@ -0,0 +1,1 @@ +contents of hello """ in template) self.assertTrue(u"""\ added: hell\u00d8 """.encode('utf8') in template)