← 返回首页
feat(functional): add pull mirror test · python-gitlab/python-gitlab@3b31ade · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

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

Provide feedback

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

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Commit 3b31ade

Browse files
authored andcommitted
feat(functional): add pull mirror test
1 parent 2411bff commit 3b31ade

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎tests/functional/api/test_projects.py‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,24 @@ def test_project_remote_mirrors(project):
310310
mirror.delete()
311311

312312

313+
def test_project_pull_mirrors(project):
314+
mirror_url = "https://gitlab.example.com/root/mirror.git"
315+
316+
mirror = project.pull_mirror.create({"url": mirror_url})
317+
assert mirror.url == mirror_url
318+
319+
mirror.enabled = True
320+
mirror.save()
321+
322+
mirror = project.pull_mirror.get()
323+
assert isinstance(mirror, gitlab.v4.objects.ProjectPullMirror)
324+
assert mirror.url == mirror_url
325+
assert mirror.enabled is True
326+
327+
mirror.enabled = False
328+
mirror.save()
329+
330+
313331
def test_project_services(project):
314332
# Use 'update' to create a service as we don't have a 'create' method and
315333
# to add one is somewhat complicated so it hasn't been done yet.

0 commit comments

Comments
 (0)

Footer

© 2026 GitHub, Inc.