diff options
author | Max Wittig <max.wittig@siemens.com> | 2020-03-19 07:58:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-19 07:58:18 +0100 |
commit | 4ffaf1dc0365690df810c99573f5737f635240e0 (patch) | |
tree | 7664f26b9d8863650471cd7cfa4d0b0d15508f9b /gitlab/tests/test_gitlab.py | |
parent | ad7e2bf7472668ffdcc85eec30db4139b92595a6 (diff) | |
parent | 9b16614ba6444b212b3021a741b9c184ac206af1 (diff) | |
download | gitlab-4ffaf1dc0365690df810c99573f5737f635240e0.tar.gz |
Merge pull request #1040 from nejch/test/project-export-import
test: update tests and params for project export/import
Diffstat (limited to 'gitlab/tests/test_gitlab.py')
-rw-r--r-- | gitlab/tests/test_gitlab.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py index 249d0c5..591f166 100644 --- a/gitlab/tests/test_gitlab.py +++ b/gitlab/tests/test_gitlab.py @@ -937,33 +937,6 @@ class TestGitlab(unittest.TestCase): self.assertEqual(ret["message"], "Message") self.assertEqual(ret["id"], "ed899a2f4b50b4370feeea94676502b42383c746") - def test_import_github(self): - @urlmatch( - scheme="http", - netloc="localhost", - path="/api/v4/import/github", - method="post", - ) - def resp_import_github(url, request): - headers = {"content-type": "application/json"} - content = """{ - "id": 27, - "name": "my-repo", - "full_path": "/root/my-repo", - "full_name": "Administrator / my-repo" - }""" - content = content.encode("utf-8") - return response(200, content, headers, None, 25, request) - - with HTTMock(resp_import_github): - base_path = "/root" - name = "my-repo" - ret = self.gl.projects.import_github("githubkey", 1234, base_path, name) - self.assertIsInstance(ret, dict) - self.assertEqual(ret["name"], name) - self.assertEqual(ret["full_path"], "/".join((base_path, name))) - self.assertTrue(ret["full_name"].endswith(name)) - def test_applications(self): content = '{"name": "test_app", "redirect_uri": "http://localhost:8080", "scopes": ["api", "email"]}' json_content = json.loads(content) |