betamaxpy / betamax

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

Retrying the same URL #73

Closed Glueon closed 9 years ago

Glueon commented 9 years ago

I realized that quite often I encounter such a pattern:

Sure enough betamax caches the first GET response which tells that the abstract task is still in progress, therefore my tests fail.

Can I solve this problem configuring a betamax somehow? Current project I am working on returns a 206 status code in case task isn't ready yet, so in theory I could create my own matcher which does not serialize such requests but as far as I understand I can't do that per-test with the betamax_session fixture?

Do have any other ideas on how to address the problem? Right now I use a time.sleep(1) crutch.

sigmavirus24 commented 9 years ago

Hey @Glueon, please don't use issues for support requests.

That said, no there isn't very much to do beyond writing a custom matcher that said, without more details, I can't really help write one (and issues aren't the appropriate place to discuss them).