betamaxpy / betamax

A VCR imitation designed only for python-requests.
https://betamax.readthedocs.io/en/latest/
Other
566 stars 62 forks source link

Using Betamax to mock boto3 traffic #92

Closed nchammas closed 8 years ago

nchammas commented 8 years ago

This project is so cool.

Can you somehow use it to mock boto3 traffic?

I'm looking at this library as a potential alternative to to moto. From a quick look at both libraries, it looks like Betamax is more general than moto in its ability to mock network traffic. Moto -- I think -- has to mock specific AWS endpoints, whereas Betamax can generically capture and replay network traffic.

Did I understand correctly? Does it make sense to look into using Betamax to mock out AWS/boto3 traffic?

sigmavirus24 commented 8 years ago

So http://www.roadsi.de/betamaxing-boto3.html talks about using betamax to test boto3. I think you should talk to the boto3 maintainers about providing some testing fixtures so you can use betamax to record your usage of boto3 in test environments.

I don't know boto3 well enough to tell you how easy it would be to use betamax with boto3 but it absolutely should be possible.

Cheers!

nchammas commented 8 years ago

Thanks for the reference! I'll check it out and follow-up with the boto3 maintainers if necessary.