Skip to content
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

Cassette Naming Flexibility #898

Open
harshsp-31 opened this issue Jan 9, 2025 · 0 comments
Open

Cassette Naming Flexibility #898

harshsp-31 opened this issue Jan 9, 2025 · 0 comments

Comments

@harshsp-31
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant