Mercurial > kallithea
diff kallithea/tests/fixture.py @ 8982:a136383459ef stable
api: add possibility to optionally return comments from get_changeset()
author | Manuel Jacob <me@manueljacob.de> |
---|---|
date | Wed, 29 Mar 2023 11:59:07 +0200 |
parents | f2dc57c123cf |
children |
line wrap: on
line diff
--- a/kallithea/tests/fixture.py Wed Mar 29 11:05:00 2023 +0200 +++ b/kallithea/tests/fixture.py Wed Mar 29 11:59:07 2023 +0200 @@ -329,6 +329,11 @@ meta.Session().commit() return csm + def add_changeset_comment(self, repo, revision, text, author=TEST_USER_ADMIN_LOGIN, f_path=None, line_no=None): + comment = ChangesetCommentsModel().create(text, repo, author, revision=revision, f_path=f_path, line_no=line_no, send_email=False) + meta.Session().commit() + return comment + def create_pullrequest(self, testcontroller, repo_name, pr_src_rev, pr_dst_rev, title='title'): org_ref = 'branch:stable:%s' % pr_src_rev other_ref = 'branch:default:%s' % pr_dst_rev