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

Commit373b46c

Browse files
committed
fix(groups): adding unit test for list_ldap_group_sync
1 parent858dd8b commit373b46c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎tests/unit/objects/test_groups.py‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
fromgitlab.v4.objects.projectsimportGroupProject,SharedProject
1313

1414
content= {"name":"name","id":1,"path":"path"}
15+
ldap_group_links_content= [
16+
{
17+
"cn":None,
18+
"group_access":40,
19+
"provider":"ldapmain",
20+
"filter":"(memberOf=cn=some_group,ou=groups,ou=fake_ou,dc=sub_dc,dc=example,dc=tld)",
21+
}
22+
]
1523
projects_content= [
1624
{
1725
"id":9,
@@ -261,6 +269,19 @@ def test_list_group_descendant_groups(group, resp_list_subgroups_descendant_grou
261269
assertdescendant_groups[0].path==subgroup_descgroup_content[0]["path"]
262270

263271

272+
@pytest.fixture
273+
defresp_list_ldap_group_links(no_content):
274+
withresponses.RequestsMock()asrsps:
275+
rsps.add(
276+
method=responses.GET,
277+
url="http://localhost/api/v4/groups/1/ldap_group_links",
278+
json=ldap_group_links_content,
279+
content_type="application/json",
280+
status=200,
281+
)
282+
yieldrsps
283+
284+
264285
@pytest.mark.skip("GitLab API endpoint not implemented")
265286
deftest_refresh_group_export_status(group,resp_export):
266287
export=group.exports.create()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp