Skip to content

Commit b79d1d4

Browse files
committed
test: import fixture?
1 parent ddec1a3 commit b79d1d4

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

tests/functional/api/test_statistics.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
GitLab API: https://docs.gitlab.com/ee/api/statistics.html
33
"""
44

5+
from tests.functional.conftest import reset_gitlab
56

6-
def test_get_statistics(gl, reset_gitlab):
7+
8+
def test_get_statistics(gl):
79

810
# delete resources created from other functional tests to reset application statistics
911
reset_gitlab(gl)

tests/functional/conftest.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,17 @@ def reset_gitlab(gl: gitlab.Gitlab) -> None:
9999
logging.info(f"Groups to be deleted: {full_paths}")
100100
for group in gl.groups.list():
101101
logging.info(f"Current group: {group.full_path!r}, group_id: {group.get_id()}")
102-
descendant_full_paths = [group.full_path for group in group.descendant_groups.list(order_by="id", sort="desc")]
102+
descendant_full_paths = [
103+
group.full_path
104+
for group in group.descendant_groups.list(order_by="id", sort="desc")
105+
]
103106
logging.info(f"Descendant groups to be deleted: {descendant_full_paths}")
104-
for descendant_group in group.descendant_groups.list(order_by="id", sort="desc"):
105-
logging.info(f"Current group: {descendant_group.full_path!r}, group_id: {descendant_group.get_id()}")
107+
for descendant_group in group.descendant_groups.list(
108+
order_by="id", sort="desc"
109+
):
110+
logging.info(
111+
f"Current group: {descendant_group.full_path!r}, group_id: {descendant_group.get_id()}"
112+
)
106113
for deploy_token in group.deploytokens.list():
107114
logging.info(
108115
f"Deleting deploy token: {deploy_token.username!r} in "

0 commit comments

Comments
 (0)