summaryrefslogtreecommitdiff
path: root/tests/unit/test_exceptions.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2022-06-25 10:02:53 -0700
committerJohn L. Villalovos <john@sodarock.com>2022-06-25 10:02:53 -0700
commit7577c91c5819c8f37acbf4d4c3eee3ffd84522a0 (patch)
treec48fc0d5263ed1956b2febee96bab4d5ad323b6f /tests/unit/test_exceptions.py
parentf9b7c7b5c1c5782ffe1cec19420f3484681e1a67 (diff)
downloadgitlab-jlvillal/version_in_keyerror.tar.gz
chore: add the version of python-gitlab to GitlabErrorjlvillal/version_in_keyerror
People will post tracebacks of exceptions but not post information on the version of python-gitlab used. Add the version of python-gitlab to the GitlabError exception message.
Diffstat (limited to 'tests/unit/test_exceptions.py')
-rw-r--r--tests/unit/test_exceptions.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/unit/test_exceptions.py b/tests/unit/test_exceptions.py
index 6ef0939..dd1a748 100644
--- a/tests/unit/test_exceptions.py
+++ b/tests/unit/test_exceptions.py
@@ -6,8 +6,11 @@ from gitlab import exceptions
@pytest.mark.parametrize(
"kwargs,expected",
[
- ({"error_message": "foo"}, "foo"),
- ({"error_message": "foo", "response_code": "400"}, "400: foo"),
+ ({"error_message": "foo"}, f"foo{exceptions._PG_VERSION}"),
+ (
+ {"error_message": "foo", "response_code": "400"},
+ f"400: foo{exceptions._PG_VERSION}",
+ ),
],
)
def test_gitlab_error(kwargs, expected):