I ran into some issues when using VCR to record interactions with a MessagePack based backend since JSON can only encode binary data.
I rewrote the saving and loading parts to base64-encode the data, if it is deemed to be binary (i.e isn't a valid string).
Since the gzip handling is a subset of binary data, I got rid of the special casing for gzipped data as well. The downside of this is that old cassettes containing gzipped data will need to be re-recorded (we could of course keep the special casing of gzipped data) and gzipped endpoints won't be easily inspectable via the json cassettes.
I think that's a fair tradeoff in order to get the recordings as close as possible to the actual API.
Coverage increased (+0.6%) to 93.512% when pulling 73df34d58e24ffb60d558227f6fd100766fd4f61 on frekw:master into 0f8aeeb19e5164917302ce257a2a1c324e02ff3b on parroty:master.
Hi!
I ran into some issues when using VCR to record interactions with a MessagePack based backend since JSON can only encode binary data.
I rewrote the saving and loading parts to base64-encode the data, if it is deemed to be binary (i.e isn't a valid string).
Since the gzip handling is a subset of binary data, I got rid of the special casing for gzipped data as well. The downside of this is that old cassettes containing gzipped data will need to be re-recorded (we could of course keep the special casing of gzipped data) and gzipped endpoints won't be easily inspectable via the json cassettes.
I think that's a fair tradeoff in order to get the recordings as close as possible to the actual API.