summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Wittig <max.wittig@siemens.com>2019-10-06 18:47:20 +0200
committerMax Wittig <max.wittig@siemens.com>2019-10-06 18:47:20 +0200
commite59356f6f90d5b01abbe54153441b6093834aa11 (patch)
tree8cd5fe20db948365044f65ce4e13b5f0e6ca9830
parentb5969a2dcea77fa608cc29be7a5f39062edd3846 (diff)
downloadgitlab-feat/update_submodule.tar.gz
test(submodules): correct test methodfeat/update_submodule
-rw-r--r--gitlab/tests/test_gitlab.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py
index b938cef..bd968b1 100644
--- a/gitlab/tests/test_gitlab.py
+++ b/gitlab/tests/test_gitlab.py
@@ -729,8 +729,8 @@ class TestGitlab(unittest.TestCase):
@urlmatch(
scheme="http",
netloc="localhost",
- path="/api/v4/projects/$1/repository/submodules/foo%2Fbar",
- method="post",
+ path="/api/v4/projects/1/repository/submodules/foo%2Fbar",
+ method="put",
)
def resp_update_submodule(url, request):
headers = {"content-type": "application/json"}
@@ -751,12 +751,12 @@ class TestGitlab(unittest.TestCase):
content = content.encode("utf-8")
return response(200, content, headers, None, 5, request)
- with HTTMock(resp_update_submodule):
+ with HTTMock(resp_get_project):
project = self.gl.projects.get(1)
self.assertIsInstance(project, Project)
self.assertEqual(project.name, "name")
self.assertEqual(project.id, 1)
-
+ with HTTMock(resp_update_submodule):
ret = project.update_submodule(
submodule="foo/bar",
branch="master",