@@ -224,6 +224,19 @@ def resp_delete_push_rules_group(no_content):
224
224
yield rsps
225
225
226
226
227
+ @pytest .fixture
228
+ def resp_list_ldap_group_links (no_content ):
229
+ with responses .RequestsMock () as rsps :
230
+ rsps .add (
231
+ method = responses .GET ,
232
+ url = "http://localhost/api/v4/groups/1/ldap_group_links" ,
233
+ json = ldap_group_links_content ,
234
+ content_type = "application/json" ,
235
+ status = 200 ,
236
+ )
237
+ yield rsps
238
+
239
+
227
240
def test_get_group (gl , resp_groups ):
228
241
data = gl .groups .get (1 )
229
242
assert isinstance (data , gitlab .v4 .objects .Group )
@@ -269,17 +282,10 @@ def test_list_group_descendant_groups(group, resp_list_subgroups_descendant_grou
269
282
assert descendant_groups [0 ].path == subgroup_descgroup_content [0 ]["path" ]
270
283
271
284
272
- @pytest .fixture
273
- def resp_list_ldap_group_links (no_content ):
274
- with responses .RequestsMock () as rsps :
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
- yield rsps
285
+ def test_list_ldap_group_links (group , resp_list_ldap_group_links ):
286
+ ldap_group_links = group .list_ldap_group_links ()
287
+ assert isinstance (ldap_group_links , list )
288
+ assert ldap_group_links [0 ]["provider" ] == ldap_group_links_content [0 ]["provider" ]
283
289
284
290
285
291
@pytest .mark .skip ("GitLab API endpoint not implemented" )
0 commit comments