summaryrefslogtreecommitdiff
path: root/gitlab/tests/test_config.py
diff options
context:
space:
mode:
authorKay-Uwe (Kiwi) Lorenz <kiwi@moduleworks.com>2021-03-06 12:22:33 +0100
committerKay-Uwe (Kiwi) Lorenz <kiwi@moduleworks.com>2021-03-06 12:22:33 +0100
commitf8cf1e110401dcc6b9b176beb8675513fc1c7d17 (patch)
tree050158557dc2aaccadb30d1e29a9adceb75fd4b0 /gitlab/tests/test_config.py
parent9ef83118efde3d0f35d73812ce8398be2c18ebff (diff)
downloadgitlab-f8cf1e110401dcc6b9b176beb8675513fc1c7d17.tar.gz
chore: add test
Diffstat (limited to 'gitlab/tests/test_config.py')
-rw-r--r--gitlab/tests/test_config.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/gitlab/tests/test_config.py b/gitlab/tests/test_config.py
index 7a9e239..acef007 100644
--- a/gitlab/tests/test_config.py
+++ b/gitlab/tests/test_config.py
@@ -51,6 +51,10 @@ per_page = 50
[four]
url = https://four.url
oauth_token = STUV
+
+[five]
+url = https://five.url
+oauth_token = lookup: echo "foobar"
"""
custom_user_agent_config = """[global]
@@ -192,6 +196,13 @@ def test_valid_data(m_open, path_exists):
assert 2 == cp.timeout
assert True == cp.ssl_verify
+ cp = config.GitlabConfigParser(gitlab_id="five")
+ assert "five" == cp.gitlab_id
+ assert "https://five.url" == cp.url
+ assert None == cp.private_token
+ assert "foobar" == cp.oauth_token
+ assert 2 == cp.timeout
+ assert True == cp.ssl_verify
@mock.patch("os.path.exists")
@mock.patch("builtins.open")