Skip to content

Commit

Permalink
test: remove duplicate resp_get_project
Browse files Browse the repository at this point in the history
  • Loading branch information
nejch committed Feb 19, 2020
1 parent 31c6562 commit cb43695
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions gitlab/tests/test_gitlab.py
Expand Up @@ -795,14 +795,6 @@ def resp_deactivate(url, request):
self.gl.users.get(1, lazy=True).deactivate()

def test_commit_revert(self):
@urlmatch(
scheme="http", netloc="localhost", path="/api/v4/projects/1$", method="get"
)
def resp_get_project(url, request):
headers = {"content-type": "application/json"}
content = '{"name": "name", "id": 1}'.encode("utf-8")
return response(200, content, headers, None, 5, request)

@urlmatch(
scheme="http",
netloc="localhost",
Expand Down Expand Up @@ -835,7 +827,7 @@ def resp_revert_commit(url, request):
content = content.encode("utf-8")
return response(200, content, headers, None, 5, request)

with HTTMock(resp_get_project, resp_get_commit):
with HTTMock(resp_get_commit):
project = self.gl.projects.get(1, lazy=True)
commit = project.commits.get("6b2257ea")
self.assertEqual(commit.short_id, "6b2257ea")
Expand Down

0 comments on commit cb43695

Please sign in to comment.