Skip to content

Commit cb43695

Browse files
committed
test: remove duplicate resp_get_project
1 parent 31c6562 commit cb43695

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

gitlab/tests/test_gitlab.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -795,14 +795,6 @@ def resp_deactivate(url, request):
795795
self.gl.users.get(1, lazy=True).deactivate()
796796

797797
def test_commit_revert(self):
798-
@urlmatch(
799-
scheme="http", netloc="localhost", path="/api/v4/projects/1$", method="get"
800-
)
801-
def resp_get_project(url, request):
802-
headers = {"content-type": "application/json"}
803-
content = '{"name": "name", "id": 1}'.encode("utf-8")
804-
return response(200, content, headers, None, 5, request)
805-
806798
@urlmatch(
807799
scheme="http",
808800
netloc="localhost",
@@ -835,7 +827,7 @@ def resp_revert_commit(url, request):
835827
content = content.encode("utf-8")
836828
return response(200, content, headers, None, 5, request)
837829

838-
with HTTMock(resp_get_project, resp_get_commit):
830+
with HTTMock(resp_get_commit):
839831
project = self.gl.projects.get(1, lazy=True)
840832
commit = project.commits.get("6b2257ea")
841833
self.assertEqual(commit.short_id, "6b2257ea")

0 commit comments

Comments
 (0)