httmock icon indicating copy to clipboard operation
httmock copied to clipboard

Allow content=None when stream=True

Open cancan101 opened this issue 8 years ago • 0 comments

Right now if content=None when stream=True, then you get:

  File "/Users/alex/.virtualenvs/media/lib/python2.7/site-packages/httmock.py", line 194, in intercept
    stream=kwargs.get('stream', False))
  File "/Users/alex/.virtualenvs/media/lib/python2.7/site-packages/httmock.py", line 63, in response
    res.raw = BytesIO(content)
TypeError: must be string or buffer, not None

cancan101 avatar Sep 02 '16 15:09 cancan101