You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've ran into the issue with repeated request and the default times: 1 being exceeded quite a few times and it has confused me every time. Could pook give a better error message when a mock has matched but times is exceeded. For example:
mock=pook.get(url, reply=404)
requests.get(url) # worksrequests.get(url) # fails with "pook error! Cannot match any mock for the following request"
Could the error instead say Matched a mock, but it can only be called {n} times?
The text was updated successfully, but these errors were encountered:
That sounds like a great idea, it might be helpful in other cases too, even when times was not used.
A potential avenue for implementing this would be to iterate through the list of mocks and try to find one that would match if times hadn't been exhausted.
I've ran into the issue with repeated request and the default
times: 1
being exceeded quite a few times and it has confused me every time. Could pook give a better error message when a mock has matched buttimes
is exceeded. For example:Could the error instead say
Matched a mock, but it can only be called {n} times
?The text was updated successfully, but these errors were encountered: