summaryrefslogtreecommitdiff
path: root/gitlab/tests/test_gitlab.py
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-01-31 19:17:14 +0100
committerNejc Habjan <hab.nejc@gmail.com>2021-02-04 22:54:46 +0100
commit2edd69c55fc7f4f69e119397f0d37823d3417bc6 (patch)
tree51ab0e39f4aaeddc9fd7d96d059f7dfebb376fd6 /gitlab/tests/test_gitlab.py
parent643454c5c5bbfb66d5890232a4f07fb04a753486 (diff)
downloadgitlab-2edd69c55fc7f4f69e119397f0d37823d3417bc6.tar.gz
feat(api): default to gitlab.com if no URL given
Diffstat (limited to 'gitlab/tests/test_gitlab.py')
-rw-r--r--gitlab/tests/test_gitlab.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py
index 4a82207..202a101 100644
--- a/gitlab/tests/test_gitlab.py
+++ b/gitlab/tests/test_gitlab.py
@@ -21,7 +21,7 @@ import pickle
import pytest
from httmock import HTTMock, response, urlmatch, with_httmock # noqa
-from gitlab import Gitlab, GitlabList, USER_AGENT
+from gitlab import Gitlab, GitlabList, DEFAULT_URL, USER_AGENT
from gitlab.v4.objects import CurrentUser
@@ -128,6 +128,11 @@ def test_gitlab_token_auth(gl, callback=None):
assert isinstance(gl.user, CurrentUser)
+def test_gitlab_default_url():
+ gl = Gitlab()
+ assert gl.url == DEFAULT_URL
+
+
def test_gitlab_from_config(default_config):
config_path = default_config
Gitlab.from_config("one", [config_path])