Closed Glueon closed 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).
I realized that quite often I encounter such a pattern:
betamax_session
pytest fixture, inject it into a class I'm testingPOST
-requestGET
requests to a URL until some conditions are met (ex. task is ready)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.