Skip to content

Commit

Permalink
Merge pull request #108 from alexjircan/fix/make-reset-request-journa…
Browse files Browse the repository at this point in the history
…l-for-v3

Fix `Requests.reset_request_journal()` for Wiremock V3
  • Loading branch information
leeturner authored Dec 17, 2024
2 parents 2f3819c + c70a4bc commit 6d014e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_get_request():
@responses.activate
def test_reset_request_journal():
responses.add(
responses.POST, "http://localhost/__admin/requests/reset", body="", status=200
responses.DELETE, "http://localhost/__admin/requests", body="", status=200
)

r = Requests.reset_request_journal()
Expand Down
2 changes: 1 addition & 1 deletion wiremock/resources/requests/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def get_request(cls, request_id, parameters={}):
@classmethod
def reset_request_journal(cls, parameters={}):
ids = {"id": "reset"}
response = cls.REST_CLIENT.post(cls.get_base_uri(cls.endpoint_single(), **ids), headers=make_headers(), params=parameters)
response = cls.REST_CLIENT.delete(cls.get_base_uri(cls.endpoint()), headers=make_headers(), params=parameters)
return cls.REST_CLIENT.handle_response(response)

@classmethod
Expand Down

0 comments on commit 6d014e0

Please sign in to comment.