Skip to content

Commit e59356f

Browse files
committed
test(submodules): correct test method
1 parent b5969a2 commit e59356f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gitlab/tests/test_gitlab.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,8 @@ def resp_get_project(url, request):
729729
@urlmatch(
730730
scheme="http",
731731
netloc="localhost",
732-
path="/api/v4/projects/$1/repository/submodules/foo%2Fbar",
733-
method="post",
732+
path="/api/v4/projects/1/repository/submodules/foo%2Fbar",
733+
method="put",
734734
)
735735
def resp_update_submodule(url, request):
736736
headers = {"content-type": "application/json"}
@@ -751,12 +751,12 @@ def resp_update_submodule(url, request):
751751
content = content.encode("utf-8")
752752
return response(200, content, headers, None, 5, request)
753753

754-
with HTTMock(resp_update_submodule):
754+
with HTTMock(resp_get_project):
755755
project = self.gl.projects.get(1)
756756
self.assertIsInstance(project, Project)
757757
self.assertEqual(project.name, "name")
758758
self.assertEqual(project.id, 1)
759-
759+
with HTTMock(resp_update_submodule):
760760
ret = project.update_submodule(
761761
submodule="foo/bar",
762762
branch="master",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy