Skip to content

Commit b04dd2c

Browse files
committed
fix: linting issues and test
1 parent f8cf1e1 commit b04dd2c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gitlab/tests/test_config.py

+4
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ def test_valid_data(m_open, path_exists):
196196
assert 2 == cp.timeout
197197
assert True == cp.ssl_verify
198198

199+
fd = io.StringIO(valid_config)
200+
fd.close = mock.Mock(return_value=None)
201+
m_open.return_value = fd
199202
cp = config.GitlabConfigParser(gitlab_id="five")
200203
assert "five" == cp.gitlab_id
201204
assert "https://five.url" == cp.url
@@ -204,6 +207,7 @@ def test_valid_data(m_open, path_exists):
204207
assert 2 == cp.timeout
205208
assert True == cp.ssl_verify
206209

210+
207211
@mock.patch("os.path.exists")
208212
@mock.patch("builtins.open")
209213
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)