summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-07-23 18:16:24 +0200
committerJohn Villalovos <john@sodarock.com>2022-07-23 10:32:57 -0700
commit4794ecc45d7aa08785c622918d08bb046e7359ae (patch)
tree60878cab2e063f48e21161cdba81943e0c061006 /tests
parent98336320a66d1859ba73e084a5e86edc3aa1643c (diff)
downloadgitlab-4794ecc45d7aa08785c622918d08bb046e7359ae.tar.gz
feat(projects): add support for project restore API
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/objects/test_projects.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/objects/test_projects.py b/tests/unit/objects/test_projects.py
index 85bae86..6134382 100644
--- a/tests/unit/objects/test_projects.py
+++ b/tests/unit/objects/test_projects.py
@@ -505,6 +505,19 @@ def resp_delete_push_rules_project(no_content):
@pytest.fixture
+def resp_restore_project(created_content):
+ with responses.RequestsMock() as rsps:
+ rsps.add(
+ method=responses.POST,
+ url="http://localhost/api/v4/projects/1/restore",
+ json=created_content,
+ content_type="application/json",
+ status=201,
+ )
+ yield rsps
+
+
+@pytest.fixture
def resp_start_pull_mirroring_project():
with responses.RequestsMock() as rsps:
rsps.add(
@@ -753,6 +766,10 @@ def test_project_pull_mirror(project, resp_start_pull_mirroring_project):
project.mirror_pull()
+def test_project_restore(project, resp_restore_project):
+ project.restore()
+
+
def test_project_snapshot(project, resp_snapshot_project):
tar_file = project.snapshot()
assert isinstance(tar_file, bytes)