Skip to content

Commit

Permalink
chore: add test
Browse files Browse the repository at this point in the history
  • Loading branch information
klorenz committed Mar 6, 2021
1 parent 9ef8311 commit f8cf1e1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gitlab/tests/test_config.py
Expand Up @@ -51,6 +51,10 @@
[four]
url = https://four.url
oauth_token = STUV
[five]
url = https://five.url
oauth_token = lookup: echo "foobar"
"""

custom_user_agent_config = """[global]
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit f8cf1e1

Please sign in to comment.