From da7a809772233be27fa8e563925dd2e44e1ce058 Mon Sep 17 00:00:00 2001 From: Nejc Habjan Date: Sun, 22 Mar 2020 11:52:59 -0400 Subject: feat: add support for commit GPG signature API --- tools/python_test_v4.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/python_test_v4.py') diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py index fad8c69..69b0d31 100644 --- a/tools/python_test_v4.py +++ b/tools/python_test_v4.py @@ -473,6 +473,14 @@ commit = admin_project.commits.list()[0] # assert commit.refs() # assert commit.merge_requests() +# commit GPG signature (for unsigned commits) +# TODO: reasonable tests for signed commits? +try: + signature = commit.signature() +except gitlab.GitlabGetError as e: + error_message = e.error_message +assert error_message == "404 GPG Signature Not Found" + # commit comment commit.comments.create({"note": "This is a commit comment"}) # assert len(commit.comments.list()) == 1 -- cgit v1.2.1