betamaxpy / betamax

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

Filter Sensitive Data #66

Closed Sovietaced closed 9 years ago

Sovietaced commented 9 years ago

Ruby VCR has a configuration option like so..

c.filter_sensitive_data('API_KEY') { ENV['API_KEY'] }

which will replace the 'API_KEY' string in cassettes for the actual environment variable before running tests and save the environment value as 'API_KEY' when saving the cassettes.

Does this library have a similar feature?

sigmavirus24 commented 9 years ago

VCR calls it define_cassette_placeholder as well IIRC. It's documented here.

Sovietaced commented 9 years ago

@sigmavirus24 Thank You. Missed that.

sigmavirus24 commented 9 years ago

No problem. I'm generally against aliasing things because the aliases become difficult to document. If you want to submit some patches to improve the docs, that's very welcome. I'm traveling and won't have time for a while.

Sovietaced commented 9 years ago

@sigmavirus24 Will do!