Skip to content

Commit cbde514

Browse files
committed
Merge pull request #20 from BenjamenMeyer/bugfix_util_request_mock_streaming
Bug Fix: streaming data with io.BytesIO, default body return value
2 parents 0afc3d1 + 3a8bdc3 commit cbde514

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

stackinabox/util_requests_mock.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def handle(self, request, uri):
9494
elif isinstance(body, six.binary_type):
9595
content_data = body
9696

97+
else:
98+
# default to body data
99+
body_data = body
100+
97101
return requests_mock.response.create_response(
98102
request,
99103
headers=output_headers,

0 commit comments

Comments
 (0)