In situations where a component is expected to automatically retry an endpoint, manually calling delete on a Mock may not be an option.
To support this scenario, add a new delete_after_n method to When that will remove the Mock from the server after it has matched the specified number of calls.
In situations where a component is expected to automatically retry an endpoint, manually calling
delete
on aMock
may not be an option.To support this scenario, add a new
delete_after_n
method toWhen
that will remove theMock
from the server after it has matched the specified number of calls.Related to https://github.com/alexliesenfeld/httpmock/issues/76 Related to https://github.com/alexliesenfeld/httpmock/issues/96