diff options
author | Jordan Cook <jordan.cook@pioneer.com> | 2021-08-25 16:47:22 -0500 |
---|---|---|
committer | Jordan Cook <jordan.cook@pioneer.com> | 2022-04-18 13:40:23 -0500 |
commit | 66651afd5376a17eae7d339f06448ef5c97c917b (patch) | |
tree | 59094cfebaf68797884beedb95b54e44c2f9f6dd /tests | |
parent | f1db2811aaec372d22c9c3a06caa1500e653ce51 (diff) | |
download | requests-cache-66651afd5376a17eae7d339f06448ef5c97c917b.tar.gz |
WIP: Add VCR-compatible YAML serializer
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sample_data/vcr_betamax.yaml | 0 | ||||
-rw-r--r-- | tests/sample_data/vcr_requests_cache.yaml | 46 | ||||
-rw-r--r-- | tests/sample_data/vcr_vcrpy.yaml | 76 |
3 files changed, 122 insertions, 0 deletions
diff --git a/tests/sample_data/vcr_betamax.yaml b/tests/sample_data/vcr_betamax.yaml new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/sample_data/vcr_betamax.yaml diff --git a/tests/sample_data/vcr_requests_cache.yaml b/tests/sample_data/vcr_requests_cache.yaml new file mode 100644 index 0000000..a827b0e --- /dev/null +++ b/tests/sample_data/vcr_requests_cache.yaml @@ -0,0 +1,46 @@ +http_interactions: +- recorded_at: '2021-08-15T02:14:11.003635' + request: + body: !!binary | + Tm9uZQ== + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.26.0 + method: GET + uri: https://httpbin.org/get + response: + body: + encoding: utf-8 + string: !!binary | + ewogICJhcmdzIjoge30sIAogICJoZWFkZXJzIjogewogICAgIkFjY2VwdCI6ICIqLyoiLCAKICAg + ICJBY2NlcHQtRW5jb2RpbmciOiAiZ3ppcCwgZGVmbGF0ZSIsIAogICAgIkhvc3QiOiAiaHR0cGJp + bi5vcmciLCAKICAgICJVc2VyLUFnZW50IjogInB5dGhvbi1yZXF1ZXN0cy8yLjI2LjAiLCAKICAg + ICJYLUFtem4tVHJhY2UtSWQiOiAiUm9vdD0xLTYxMTg3ODcyLTM4YjE1NmZhMjliOTU3ODMzM2Nj + NmJmMCIKICB9LCAKICAib3JpZ2luIjogIjE3My4yMS4xMjYuMTQ1IiwgCiAgInVybCI6ICJodHRw + czovL2h0dHBiaW4ub3JnL2dldCIKfQo= + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '308' + Content-Type: + - application/json + Date: + - Sun, 15 Aug 2021 02:14:10 GMT + Server: + - gunicorn/19.9.0 + status: + code: 200 + reason: OK + url: https://httpbin.org/get +recorded_with: requests-cache 0.8.0 diff --git a/tests/sample_data/vcr_vcrpy.yaml b/tests/sample_data/vcr_vcrpy.yaml new file mode 100644 index 0000000..bcf8836 --- /dev/null +++ b/tests/sample_data/vcr_vcrpy.yaml @@ -0,0 +1,76 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.26.0 + method: GET + uri: https://httpbin.org/get + response: + body: + string: "{\n \"args\": {}, \n \"headers\": {\n \"Accept\": \"*/*\", \n + \ \"Accept-Encoding\": \"gzip, deflate\", \n \"Host\": \"httpbin.org\", + \n \"User-Agent\": \"python-requests/2.26.0\", \n \"X-Amzn-Trace-Id\": + \"Root=1-61269390-110f184a5a3b52ef31278574\"\n }, \n \"origin\": \"173.21.126.145\", + \n \"url\": \"https://httpbin.org/get\"\n}\n" + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '308' + Content-Type: + - application/json + Date: + - Wed, 25 Aug 2021 19:01:36 GMT + Server: + - gunicorn/19.9.0 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - python-requests/2.26.0 + method: GET + uri: https://httpbin.org/ip + response: + body: + string: "{\n \"origin\": \"173.21.126.145\"\n}\n" + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Origin: + - '*' + Connection: + - keep-alive + Content-Length: + - '33' + Content-Type: + - application/json + Date: + - Wed, 25 Aug 2021 19:09:56 GMT + Server: + - gunicorn/19.9.0 + Foo: + - bar + status: + code: 200 + message: OK +version: 1 |