diff options
author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-06-01 23:29:58 +0200 |
---|---|---|
committer | John Villalovos <john@sodarock.com> | 2022-06-02 07:21:28 -0700 |
commit | 00aec96ed0b60720362c6642b416567ff39aef09 (patch) | |
tree | ef2acac54dc968fc27cdca2c8c81d456fb5a8494 /tests/functional | |
parent | 3d000d3de86306faee063f4edf9f09aff7590791 (diff) | |
download | gitlab-00aec96ed0b60720362c6642b416567ff39aef09.tar.gz |
test: increase client coverage
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/api/test_gitlab.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functional/api/test_gitlab.py b/tests/functional/api/test_gitlab.py index c9a24a0..3b3987e 100644 --- a/tests/functional/api/test_gitlab.py +++ b/tests/functional/api/test_gitlab.py @@ -35,6 +35,11 @@ def test_markdown(gl): assert "foo" in html +def test_markdown_in_project(gl, project): + html = gl.markdown("foo", project=project.path_with_namespace) + assert "foo" in html + + def test_lint(gl): success, errors = gl.lint("Invalid") assert success is False @@ -127,6 +132,11 @@ def test_notification_settings(gl): assert settings.level == gitlab.const.NOTIFICATION_LEVEL_WATCH +def test_search(gl): + result = gl.search(scope=gitlab.const.SEARCH_SCOPE_USERS, search="Administrator") + assert result[0]["id"] == 1 + + def test_user_activities(gl): activities = gl.user_activities.list(query_parameters={"from": "2019-01-01"}) assert isinstance(activities, list) @@ -237,3 +247,8 @@ def test_list_as_list_false_warnings(gl): for warning in caught_warnings: assert isinstance(warning.message, DeprecationWarning) assert len(list(items)) > 20 + + +def test_list_with_as_list_and_iterator_raises(gl): + with pytest.raises(ValueError, match="`as_list` or `iterator`"): + gl.gitlabciymls.list(as_list=False, iterator=True) |