diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples.md | 14 | ||||
-rw-r--r-- | docs/user_guide/compatibility.md | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/docs/examples.md b/docs/examples.md index 376e458..779a64d 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -166,3 +166,17 @@ The following scripts can also be found in the :lines: 6- ``` ::: + + +### VCR Export +```{include} ../examples/vcr.py +:start-line: 2 +:end-line: 5 +``` + +:::{admonition} Example: `vcr.py` +:class: toggle +```{literalinclude} ../examples/vcr.py +:lines: 7- +``` +:::
\ No newline at end of file diff --git a/docs/user_guide/compatibility.md b/docs/user_guide/compatibility.md index 47eb5d4..fff338c 100644 --- a/docs/user_guide/compatibility.md +++ b/docs/user_guide/compatibility.md @@ -172,3 +172,14 @@ requests-mock examples above. ```{literalinclude} ../../tests/compat/test_responses_load_cache.py ``` ::: + +## VCR +If you would like to reuse your cached response data for unit tests, one option is to convert your +cache into a format compatible with VCR-vased libraries like +[vcrpy](https://github.com/kevin1024/vcrpy) and [betamax](https://github.com/betamaxpy/betamax). +:::{admonition} Example: vcr.py +:class: toggle +```{literalinclude} ../../examples/vcr.py +:lines: 7- +``` +::: |