mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-10 09:35:34 +00:00
Added migration script for old cassettes
This commit is contained in:
31
tests/fixtures/migration/new_cassette.json
vendored
Normal file
31
tests/fixtures/migration/new_cassette.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
[
|
||||
{
|
||||
"request": {
|
||||
"body": null,
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept-Encoding": "gzip, deflate, compress",
|
||||
"Accept": "*/*",
|
||||
"User-Agent": "python-requests/2.2.1 CPython/2.6.1 Darwin/10.8.0"
|
||||
},
|
||||
"uri" : "http://httpbin.org:80/ip"
|
||||
},
|
||||
"response": {
|
||||
"status": {
|
||||
"message": "OK",
|
||||
"code": 200
|
||||
},
|
||||
"headers": [
|
||||
"Access-Control-Allow-Origin: *\r\n",
|
||||
"Content-Type: application/json\r\n",
|
||||
"Date: Mon, 21 Apr 2014 23:13:40 GMT\r\n",
|
||||
"Server: gunicorn/0.17.4\r\n",
|
||||
"Content-Length: 32\r\n",
|
||||
"Connection: keep-alive\r\n"
|
||||
],
|
||||
"body": {
|
||||
"string": "{\n \"origin\": \"217.122.164.194\"\n}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
15
tests/fixtures/migration/new_cassette.yaml
vendored
Normal file
15
tests/fixtures/migration/new_cassette.yaml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
- request: !!python/object:vcr.request.Request
|
||||
body: null
|
||||
headers: !!python/object/apply:__builtin__.frozenset
|
||||
- - !!python/tuple [Accept-Encoding, 'gzip, deflate, compress']
|
||||
- !!python/tuple [User-Agent, python-requests/2.2.1 CPython/2.6.1 Darwin/10.8.0]
|
||||
- !!python/tuple [Accept, '*/*']
|
||||
method: GET
|
||||
uri: http://httpbin.org:80/ip
|
||||
response:
|
||||
body: {string: !!python/unicode "{\n \"origin\": \"217.122.164.194\"\n}"}
|
||||
headers: [!!python/unicode "Access-Control-Allow-Origin: *\r\n", !!python/unicode "Content-Type:
|
||||
application/json\r\n", !!python/unicode "Date: Mon, 21 Apr 2014 23:06:09 GMT\r\n",
|
||||
!!python/unicode "Server: gunicorn/0.17.4\r\n", !!python/unicode "Content-Length:
|
||||
32\r\n", !!python/unicode "Connection: keep-alive\r\n"]
|
||||
status: {code: 200, message: OK}
|
||||
1
tests/fixtures/migration/not_cassette.txt
vendored
Normal file
1
tests/fixtures/migration/not_cassette.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
This is not a cassette
|
||||
34
tests/fixtures/migration/old_cassette.json
vendored
Normal file
34
tests/fixtures/migration/old_cassette.json
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
[
|
||||
{
|
||||
"request": {
|
||||
"body": null,
|
||||
"protocol": "http",
|
||||
"method": "GET",
|
||||
"headers": {
|
||||
"Accept-Encoding": "gzip, deflate, compress",
|
||||
"Accept": "*/*",
|
||||
"User-Agent": "python-requests/2.2.1 CPython/2.6.1 Darwin/10.8.0"
|
||||
},
|
||||
"host": "httpbin.org",
|
||||
"path": "/ip",
|
||||
"port": 80
|
||||
},
|
||||
"response": {
|
||||
"status": {
|
||||
"message": "OK",
|
||||
"code": 200
|
||||
},
|
||||
"headers": [
|
||||
"Access-Control-Allow-Origin: *\r\n",
|
||||
"Content-Type: application/json\r\n",
|
||||
"Date: Mon, 21 Apr 2014 23:13:40 GMT\r\n",
|
||||
"Server: gunicorn/0.17.4\r\n",
|
||||
"Content-Length: 32\r\n",
|
||||
"Connection: keep-alive\r\n"
|
||||
],
|
||||
"body": {
|
||||
"string": "{\n \"origin\": \"217.122.164.194\"\n}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
18
tests/fixtures/migration/old_cassette.yaml
vendored
Normal file
18
tests/fixtures/migration/old_cassette.yaml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
- request: !!python/object:vcr.request.Request
|
||||
body: null
|
||||
headers: !!python/object/apply:__builtin__.frozenset
|
||||
- - !!python/tuple [Accept-Encoding, 'gzip, deflate, compress']
|
||||
- !!python/tuple [User-Agent, python-requests/2.2.1 CPython/2.6.1 Darwin/10.8.0]
|
||||
- !!python/tuple [Accept, '*/*']
|
||||
host: httpbin.org
|
||||
method: GET
|
||||
path: /ip
|
||||
port: 80
|
||||
protocol: http
|
||||
response:
|
||||
body: {string: !!python/unicode "{\n \"origin\": \"217.122.164.194\"\n}"}
|
||||
headers: [!!python/unicode "Access-Control-Allow-Origin: *\r\n", !!python/unicode "Content-Type:
|
||||
application/json\r\n", !!python/unicode "Date: Mon, 21 Apr 2014 23:06:09 GMT\r\n",
|
||||
!!python/unicode "Server: gunicorn/0.17.4\r\n", !!python/unicode "Content-Length:
|
||||
32\r\n", !!python/unicode "Connection: keep-alive\r\n"]
|
||||
status: {code: 200, message: OK}
|
||||
Reference in New Issue
Block a user