Skip to content

Commit accd5aa

Browse files
JohnVillalovosnejch
authored andcommitted
chore: resolve DeprecationWarning message in CI run
Catch the DeprecationWarning in our test, as we expect it.
1 parent 95db680 commit accd5aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: tests/functional/api/test_snippets.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ def test_snippets(gl):
2424
assert content.decode() == "import gitlab"
2525

2626
all_snippets = gl.snippets.list_all(get_all=True)
27-
public_snippets = gl.snippets.public(get_all=True)
27+
with pytest.warns(
28+
DeprecationWarning, match=r"Gitlab.snippets.public\(\) is deprecated"
29+
):
30+
public_snippets = gl.snippets.public(get_all=True)
2831
list_public_snippets = gl.snippets.list_public(get_all=True)
2932
assert isinstance(all_snippets, list)
3033
assert isinstance(list_public_snippets, list)

0 commit comments

Comments
 (0)