Open kratsg opened 2 years ago
Is this a docs issue or a feature request? It's hard to tell.
Is this a docs issue or a feature request? It's hard to tell.
I'm showing code example of how to get around this for now, but it's not clear if this should be a feature request or not. I've waffled because I think betamax
is doing the right thing in taking the string provided by the user and looking for it. I would be a little worried if it started replacing strings I didn't specify exactly.
Also somewhat related -- the placeholder functionality will not replace anything in response bodies that were base64-encoded (which is another gotcha).
Betamax supports uri substitution (https://github.com/betamaxpy/betamax/blob/2c12cee59ac365f39497a3718eed04ab9c6ce988/src/betamax/cassette/interaction.py#L99-L107) however you might typically need to quote the string you're looking for first. E.G. something like this
It would be nice if betamax checked for the quoted value as well, because you don't get it at the time of filtering the requests through the interaction?