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).

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created July 26, 2022 at 2:53 PM
Updated August 1, 2022 at 8:42 AM
Resolved August 1, 2022 at 8:42 AM