-
Notifications
You must be signed in to change notification settings - Fork 2
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
Playback: Check outgoing traffic if it matches what is recorded in VCR tape + check if test source code changed + remove non-gzip vcr tape compat #8
base: master
Are you sure you want to change the base?
Conversation
2cfda16
to
2f2e1d0
Compare
Handling of start/stop need cleaning up, I think. That's probably why this fails, although it has no vcr decorator: https://travis-ci.org/obspy/vcr/jobs/218428957#L462 Oh and yeah, I did not update vcr tapes yet.. will do later.. |
Ok, so since the context manager was added on master I will get rid of b602658 again and rebase on master.. |
Rebased on current master and force-pushed. Hope I didn't mess up, change to context manager made some conflict resolving necessary.. commit hash before rebase was 5a4b8ee. |
53cf697
to
c5092f0
Compare
Rebased and force-pushed.. tests should pass now hopefully ;-) |
also add soem more debug output
outgoing traffic check during playback
e4b5b85
to
a5be0e0
Compare
All but one test pass locally on Linux Python 3.6 |
changed since time of vcr tape recording
actual outgoing traffic is sent
tapes anyway, so there will be no valid old vcr tapes around
tests, also after reset() in test code
a5be0e0
to
74bb27d
Compare
This adds checking outgoing traffic during playback. This is sorely needed, otherwise code can be broken (e.g. sending malformed results), while VCR playback based tests pass (because incoming traffic is replayed not regarding if the request was valid).
This needs some mechanics to normalize actual/pre-recorded outgoing traffic before comparing the two. I'm open to suggestions for handling this differently as implemented right now.
This also introduces some exception classes.
No tests for this right now, but it works in real world ..
This now also adds the missing detail of making sure that test code (whether doctest examples or unittest test method) did not change from recording time to playback time. Otherwise the executed client side API calls might not match the VCR recording anymore.