vcrpy icon indicating copy to clipboard operation
vcrpy copied to clipboard

Cassette Naming Flexibility

Open harshsp-31 opened this issue 10 months ago • 0 comments
trafficstars

Hi,

I wanted to know if I could name the cassettes based on the url it will be calling through the test functions? Since I have a chain of URLs that might be dynamically called in one test function, I don't want to save the cassette name by the test function name, rather I want to save the cassette based on the URLs it calls. I tried playing around with the configurational settings but what I found was that dynamically capturing URLs through before_record hook wasn't enough to name the cassette file as the context manager requires the cassette file path to be set before entering it. Is there a way to circumvent this?

harshsp-31 avatar Jan 09 '25 09:01 harshsp-31