MockHTTPResponse cannot be replayed, will only work once
Description
When doing mock testing, the MockHTTPResponse can only be played once, and will fail if the test code ends up calling it multiple times. A simple way to make it re-playable is to load the contents in memory, rather than using a “one-off” stream. This might pose an issue with very large payloads, but I don’t think we are using them (because we don’t recommend committing large files to git).
When doing mock testing, the MockHTTPResponse can only be played once, and will fail if the test code ends up calling it multiple times. A simple way to make it re-playable is to load the contents in memory, rather than using a “one-off” stream. This might pose an issue with very large payloads, but I don’t think we are using them (because we don’t recommend committing large files to git).