httptest
httptest copied to clipboard
how to test for sequence of responses
e.g. when the API returns 502, 502, 200.
Suggestion: making httptest able to loop through mockfile if they are named
- filename-corresponding-to-the-request-1
- filename-corresponding-to-the-request-2
- filename-corresponding-to-the-request-3
- ...
I’ve been thinking (though haven’t yet found a satisfactory way) of doing the same in dittodb. If I do come up with something I’ll mention it here since at least some of that machinery should be similar, if not basically the same.
I wonder where and how one would store the index of the request (this is the first request for this request, the second one etc).