File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 2
2
GitLab API: https://docs.gitlab.com/ee/api/statistics.html
3
3
"""
4
4
5
+ from itertools import count
5
6
from tests .functional .conftest import reset_gitlab
6
7
7
8
@@ -31,6 +32,6 @@ def test_get_statistics(gl):
31
32
32
33
statistics = gl .statistics .get ()
33
34
assert statistics .snippets == "1"
34
- assert statistics .users == "1"
35
+ assert statistics .users == str ( 1 + count ( gl . users . list ( search = "ghost" )))
35
36
assert statistics .groups == "2"
36
37
assert statistics .projects == "1"
Original file line number Diff line number Diff line change 1
1
import dataclasses
2
+ from itertools import count
2
3
import logging
3
4
import pathlib
4
5
import tempfile
@@ -128,6 +129,8 @@ def reset_gitlab(gl: gitlab.Gitlab) -> None:
128
129
if user .username not in ["root" , "ghost" ]:
129
130
logging .info (f"Deleting user: { user .username !r} " )
130
131
helpers .safe_delete (user , hard_delete = True )
132
+ users_left = gl .users .list (search = "ghost" )
133
+ print (f"users left: { count (users_left )} " )
131
134
132
135
133
136
def set_token (container : str , fixture_dir : pathlib .Path ) -> str :
You can’t perform that action at this time.
0 commit comments