-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Betamax objects share global configuration #40
Comments
It shouldn't be that surprising given that we explicitly mention that the Configuration object is a proxy to global settings and is meant to be used once. The documentation for the Betamax object is currently out of date (in suggesting you should pass I can see the purpose of setting different cassette library directories, so I'll fix that, but I'm also going to deprecate passing a dictionary of default cassette options as well. It doesn't quite belong there. All of those options should either be set once globally, or if they are a per-request issue, should be passed to bm = Betamax(Session()) # cassette_library_dir optional
bm2 = Betamax(Session())
bm.use_cassette('cassette_name', record='none')
bm.use_cassette('other_cassette_name', record='all') Granted the documentation for this is also missing. |
Awesome, thanks for the quick response! Would it be reasonable to use named parameters instead of |
Oh damn, I never responded. I'm totally okay with that. I was using |
FWIW, I'm considering a 1.0 in which each |
All configuration information seems to be shared between all
Betamax
objects, which means that creating a new instance changes the behaviour of existing objects:This is both surprising and problematic when one wants to use different recorders for different requests within the same test.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/4462489-betamax-objects-share-global-configuration?utm_campaign=plugin&utm_content=tracker%2F198445&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F198445&utm_medium=issues&utm_source=github).The text was updated successfully, but these errors were encountered: