summaryrefslogtreecommitdiff
path: root/gitlab/tests/objects/test_projects.py
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2020-04-06 09:40:35 +0200
committerGitHub <noreply@github.com>2020-04-06 09:40:35 +0200
commitc161852b5a976d11f682c5af00ff3f4e8daa26ef (patch)
treecb2b89648e7f3678e0e6bfb47f60f77979296f99 /gitlab/tests/objects/test_projects.py
parentfa34f5e20ecbd3f5d868df2fa9e399ac6559c5d5 (diff)
parent847da6063b4c63c8133e5e5b5b45e5b4f004bdc4 (diff)
downloadgitlab-c161852b5a976d11f682c5af00ff3f4e8daa26ef.tar.gz
Merge pull request #1063 from python-gitlab/feat/group-import-export
Feat: support for group import/export API
Diffstat (limited to 'gitlab/tests/objects/test_projects.py')
-rw-r--r--gitlab/tests/objects/test_projects.py29
1 files changed, 1 insertions, 28 deletions
diff --git a/gitlab/tests/objects/test_projects.py b/gitlab/tests/objects/test_projects.py
index d87f759..1c2347a 100644
--- a/gitlab/tests/objects/test_projects.py
+++ b/gitlab/tests/objects/test_projects.py
@@ -10,21 +10,7 @@ from gitlab import * # noqa
from gitlab.v4.objects import * # noqa
from httmock import HTTMock, urlmatch, response, with_httmock # noqa
-
-headers = {"content-type": "application/json"}
-binary_content = b"binary content"
-
-
-@urlmatch(
- scheme="http", netloc="localhost", path="/api/v4/projects/1/export", method="post",
-)
-def resp_create_export(url, request):
- """Common mock for Project Export tests."""
- content = """{
- "message": "202 Accepted"
- }"""
- content = content.encode("utf-8")
- return response(202, content, headers, None, 25, request)
+from .mocks import * # noqa
@urlmatch(
@@ -52,19 +38,6 @@ def resp_export_status(url, request):
@urlmatch(
- scheme="http",
- netloc="localhost",
- path="/api/v4/projects/1/export/download",
- method="get",
-)
-def resp_download_export(url, request):
- """Mock for Project Export Download GET response."""
- headers = {"content-type": "application/octet-stream"}
- content = binary_content
- return response(200, content, headers, None, 25, request)
-
-
-@urlmatch(
scheme="http", netloc="localhost", path="/api/v4/projects/import", method="post",
)
def resp_import_project(url, request):