Skip to content

Commit 47eb8ca

Browse files
chore(tests): catch warnings for projects.transfer_projects()
When doing the functional tests, catch the expected warnings from `projects.transfer_project()`
1 parent cbbe7ce commit 47eb8ca

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/functional/api/test_projects.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import uuid
2+
import warnings
23

34
import pytest
45

@@ -333,13 +334,17 @@ def test_project_groups_list(gl, group):
333334

334335
def test_project_transfer(gl, project, group):
335336
assert project.namespace["path"] != group.full_path
336-
project.transfer_project(group.id)
337+
with warnings.catch_warnings():
338+
warnings.simplefilter("ignore")
339+
project.transfer_project(group.id)
337340

338341
project = gl.projects.get(project.id)
339342
assert project.namespace["path"] == group.full_path
340343

341344
gl.auth()
342-
project.transfer_project(gl.user.username)
345+
with warnings.catch_warnings():
346+
warnings.simplefilter("ignore")
347+
project.transfer_project(gl.user.username)
343348

344349
project = gl.projects.get(project.id)
345350
assert project.namespace["path"] == gl.user.username

0 commit comments

Comments
 (0)