summaryrefslogtreecommitdiff
path: root/tests/unit/test_gitlab.py
diff options
context:
space:
mode:
authorJohn L. Villalovos <john@sodarock.com>2021-11-30 08:37:53 -0800
committerJohn L. Villalovos <john@sodarock.com>2021-11-30 08:37:53 -0800
commit6b8067e668b6a37a19e07d84e9a0d2d2a99b4d31 (patch)
tree6f3accf36834c541caa68b46c402d67febeed041 /tests/unit/test_gitlab.py
parentc0aa0e1c9f7d7914e3062fe6503da870508b27cf (diff)
downloadgitlab-6b8067e668b6a37a19e07d84e9a0d2d2a99b4d31.tar.gz
chore: use constants from gitlab.const module
Have code use constants from the gitlab.const module instead of from the top-level gitlab module.
Diffstat (limited to 'tests/unit/test_gitlab.py')
-rw-r--r--tests/unit/test_gitlab.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/unit/test_gitlab.py b/tests/unit/test_gitlab.py
index 688da07..0d486e9 100644
--- a/tests/unit/test_gitlab.py
+++ b/tests/unit/test_gitlab.py
@@ -129,19 +129,19 @@ def test_gitlab_token_auth(gl, callback=None):
def test_gitlab_default_url():
gl = gitlab.Gitlab()
- assert gl.url == gitlab.DEFAULT_URL
+ assert gl.url == gitlab.const.DEFAULT_URL
@pytest.mark.parametrize(
"args, kwargs, expected_url, expected_private_token, expected_oauth_token",
[
- ([], {}, gitlab.DEFAULT_URL, None, None),
- ([None, token], {}, gitlab.DEFAULT_URL, token, None),
+ ([], {}, gitlab.const.DEFAULT_URL, None, None),
+ ([None, token], {}, gitlab.const.DEFAULT_URL, token, None),
([localhost], {}, localhost, None, None),
([localhost, token], {}, localhost, token, None),
([localhost, None, token], {}, localhost, None, token),
- ([], {"private_token": token}, gitlab.DEFAULT_URL, token, None),
- ([], {"oauth_token": token}, gitlab.DEFAULT_URL, None, token),
+ ([], {"private_token": token}, gitlab.const.DEFAULT_URL, token, None),
+ ([], {"oauth_token": token}, gitlab.const.DEFAULT_URL, None, token),
([], {"url": localhost}, localhost, None, None),
([], {"url": localhost, "private_token": token}, localhost, token, None),
([], {"url": localhost, "oauth_token": token}, localhost, None, token),
@@ -185,7 +185,7 @@ def test_gitlab_subclass_from_config(default_config):
@pytest.mark.parametrize(
"kwargs,expected_agent",
[
- ({}, gitlab.USER_AGENT),
+ ({}, gitlab.const.USER_AGENT),
({"user_agent": "my-package/1.0.0"}, "my-package/1.0.0"),
],
)