garnaat / placebo

Make boto3 calls that look real but have no effect.
Apache License 2.0
394 stars 28 forks source link

TypeError at S3 file retrieval #68

Open I159 opened 6 years ago

I159 commented 6 years ago

During boto3.resource('s3').Object(bucket, key).get() TypeError raised and invalid json is recorded, while a response is totally valid. bytes type is not json serializable. And response body is a file which is of bytes type. But this is not a reason to raise an error and record invalid json. I propose to stub body with empty value and finish recording without error because lack of file is not an issue for unit testing but invalid record is.

I159 commented 6 years ago

A PR to discuss https://github.com/garnaat/placebo/pull/70