Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3f94170

Browse files
committed
test(functional): check mixin behavior with lazy objects
1 parent24bc3a5 commit3f94170

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

‎tests/functional/api/test_mixins.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
importpytest
2+
3+
importgitlab
4+
5+
6+
@pytest.fixture
7+
deflazy_project(gl,project):
8+
returngl.projects.get(project.path_with_namespace,lazy=True)
9+
10+
11+
deftest_refresh_after_lazy_get_with_path(project,lazy_project):
12+
lazy_project.refresh()
13+
assertlazy_project.id==project.id
14+
15+
16+
deftest_save_after_lazy_get_with_path(project,lazy_project):
17+
lazy_project.description="A new description"
18+
lazy_project.save()
19+
assertlazy_project.id==project.id
20+
assertlazy_project.description=="A new description"
21+
22+
23+
@pytest.mark.xfail(reason="See #1494")
24+
deftest_delete_after_lazy_get_with_path(gl,lazy_project):
25+
lazy_project.delete()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp