diff options
author | John L. Villalovos <john@sodarock.com> | 2022-05-29 17:12:40 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-05-29 17:12:40 -0700 |
commit | 0b7933c5632c2f81c89f9a97e814badf65d1eb38 (patch) | |
tree | 087c06c87f2dadef60447a249ee66d41daed5b87 /tests/unit/test_gitlab.py | |
parent | f0152dc3cc9a42aa4dc3c0014b4c29381e9b39d6 (diff) | |
download | gitlab-0b7933c5632c2f81c89f9a97e814badf65d1eb38.tar.gz |
chore: correct ModuleNotFoundError() arguments
Previously in commit 233b79ed442aac66faf9eb4b0087ea126d6dffc5 I had
used the `name` argument for `ModuleNotFoundError()`. This basically
is the equivalent of not passing any message to
`ModuleNotFoundError()`. So when the exception was raised it wasn't
very helpful.
Correct that and add a unit-test that shows we get the message we
expect.
Diffstat (limited to 'tests/unit/test_gitlab.py')
-rw-r--r-- | tests/unit/test_gitlab.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unit/test_gitlab.py b/tests/unit/test_gitlab.py index 070f215..13fc2d8 100644 --- a/tests/unit/test_gitlab.py +++ b/tests/unit/test_gitlab.py @@ -91,7 +91,7 @@ def test_gitlab_init_with_valid_api_version(): def test_gitlab_init_with_invalid_api_version(): - with pytest.raises(ModuleNotFoundError): + with pytest.raises(ModuleNotFoundError, match="gitlab.v1.objects"): gitlab.Gitlab(api_version="1") |