kevin1024 / vcrpy

Automatically mock your HTTP interactions to simplify and speed up testing
MIT License
2.72k stars 388 forks source link

Allow for changing patcher builder class #680

Closed amosjyng closed 1 year ago

amosjyng commented 1 year ago

I have a project that uses its own CassettePatcherBuilder class to record interactions of a different sort than vcrpy does. However, right now this requires a bit of a hack to get around the hardcoded usage of CassettePatcherBuilder in the _patch_generator function. This is not great for future forward compatibility since my project will not be up to date on any future changes to _patch_generator, such as the most recent one where the function no longer saves cassettes because that is handled by __exit__ instead.

Would it be possible to make the CassettePatcherBuilder class more configurable?

amosjyng commented 1 year ago

NVM, I ended up doing things differently :P