Skip to content

Commit 00c5768

Browse files
committed
Update to vcrpy-6.0.2
1 parent aa71fec commit 00c5768

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2011
-821
lines changed

requirements/tests.txt

-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ pytest-asyncio
44
pytest-cov
55
pytest-timeout
66
pytest-vcr
7-
8-
# I'm unable to use vcrpy 6.x cassettes (UnicodeDecodeError on JSON body), let's try again later
9-
vcrpy<6

tests/cassettes/test_api_async_request_bad_request_error.yaml

+6-3
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ interactions:
1717
method: GET
1818
uri: https://mock.httpstatus.io/400
1919
response:
20-
content: 400 Bad Request
20+
body:
21+
string: !!binary |
22+
H4sIAAAAAAAE/zMxMFBwSkxRCEotLE0tLgEA1aEoBA8AAAA=
2123
headers: {}
22-
http_version: HTTP/1.1
23-
status_code: 400
24+
status:
25+
code: 400
26+
message: Bad Request
2427
version: 1

tests/cassettes/test_api_response_error.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ interactions:
1717
method: GET
1818
uri: https://api.notion.com/v1/invalid
1919
response:
20-
content: '{"object":"error","status":400,"code":"invalid_request_url","message":"Invalid
21-
request URL."}'
20+
body:
21+
string: '{"object":"error","status":400,"code":"invalid_request_url","message":"Invalid
22+
request URL."}'
2223
headers: {}
23-
http_version: HTTP/1.1
24-
status_code: 400
24+
status:
25+
code: 400
26+
message: Bad Request
2527
- request:
2628
body: ''
2729
headers:
@@ -40,9 +42,11 @@ interactions:
4042
method: GET
4143
uri: https://api.notion.com/v1/users
4244
response:
43-
content: '{"object":"error","status":401,"code":"unauthorized","message":"API
44-
token is invalid.","request_id":"15ca8906-fcb1-4d90-b25a-ad03ba508350"}'
45+
body:
46+
string: '{"object":"error","status":401,"code":"unauthorized","message":"API
47+
token is invalid.","request_id":"b85cdcf1-7ec8-4eac-8ce8-05dc3da2eae9"}'
4548
headers: {}
46-
http_version: HTTP/1.1
47-
status_code: 401
49+
status:
50+
code: 401
51+
message: Unauthorized
4852
version: 1

tests/cassettes/test_async_api_response_error.yaml

+12-8
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ interactions:
1717
method: GET
1818
uri: https://api.notion.com/v1/invalid
1919
response:
20-
content: '{"object":"error","status":400,"code":"invalid_request_url","message":"Invalid
21-
request URL."}'
20+
body:
21+
string: '{"object":"error","status":400,"code":"invalid_request_url","message":"Invalid
22+
request URL."}'
2223
headers: {}
23-
http_version: HTTP/1.1
24-
status_code: 400
24+
status:
25+
code: 400
26+
message: Bad Request
2527
- request:
2628
body: ''
2729
headers:
@@ -40,9 +42,11 @@ interactions:
4042
method: GET
4143
uri: https://api.notion.com/v1/users
4244
response:
43-
content: '{"object":"error","status":401,"code":"unauthorized","message":"API
44-
token is invalid.","request_id":"d11a2027-fae9-4cad-a6ea-ab6e34136dc5"}'
45+
body:
46+
string: '{"object":"error","status":401,"code":"unauthorized","message":"API
47+
token is invalid.","request_id":"81436b9e-4c86-43e6-aa51-7840e8bee746"}'
4548
headers: {}
46-
http_version: HTTP/1.1
47-
status_code: 401
49+
status:
50+
code: 401
51+
message: Unauthorized
4852
version: 1

tests/cassettes/test_async_client_request.yaml

+18-8
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ interactions:
1717
method: GET
1818
uri: https://api.notion.com/v1/invalid
1919
response:
20-
content: '{"object":"error","status":400,"code":"invalid_request_url","message":"Invalid
21-
request URL."}'
20+
body:
21+
string: '{"object":"error","status":400,"code":"invalid_request_url","message":"Invalid
22+
request URL."}'
2223
headers: {}
23-
http_version: HTTP/1.1
24-
status_code: 400
24+
status:
25+
code: 400
26+
message: Bad Request
2527
- request:
2628
body: ''
2729
headers:
@@ -40,9 +42,17 @@ interactions:
4042
method: GET
4143
uri: https://api.notion.com/v1/users
4244
response:
43-
content: '{"object":"list","results":[{"object":"user","id":"a4f789cc-7bc8-4cf0-82b9-a8ba7d985ecf","name":"Guillaume
44-
Gelin","avatar_url":"https://s3-us-west-2.amazonaws.com/public.notion-static.com/01d7053d-e135-4f27-bba0-5de532d39296/ramnes3.jpeg","type":"person","person":{"email":"[email protected]"}},{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78","name":"notion-sdk-py","avatar_url":null,"type":"bot","bot":{"owner":{"type":"workspace","workspace":true},"workspace_name":"notion-sdk-py"}}],"next_cursor":null,"has_more":false,"type":"user","user":{},"request_id":"9f260c07-a0cf-4dda-afa0-2c6e005301c5"}'
45+
body:
46+
string: !!binary |
47+
H4sIAAAAAAAAA3RSSW7cMBD8StBntUYjauXJNz8iMIQm1YxlU6LCxRNH0N8DecYLguTCLrBA1MLe
48+
wKkn1hEk2ClEyMBzSDYGkN+3Ty4F9pDBNIIEqkzb9Vpjq3SHlTYFdqXqkTpF7dh3NWsDGSw0M0i4
49+
T5O1lGb+ds92WiADeqFIfkjegoTHGNcgT6cgMAW8cIhY5jTTb7fQJeTazac1KTvpfHFxcguGSHHS
50+
b0RxHtuiFiPyWdRYmbJFpajAeuRalKPoy745eZoXDiJ/WvkHZBBf18PVyj64w8wNyA14pulwdNW5
51+
u77LOcG+Z/9pom3b2ggS2PXCYCUMoWrKGqum0M256Cvddp9NvAcYn3F9/auHJVn7YU654x+OU27g
52+
Lgv7A9zIi/PPYSXNkH3BMvrE+5eb4Z+i+/6QwcK/4qCTD86/Cz9SGGbnGaQhG/jDyS3s25DbfizH
53+
z8QhDtf4TdMrXXdYCKGx4ubo31RoSlE2tTHUk4H9DwAAAP//AwAaRI0JYgIAAA==
4554
headers: {}
46-
http_version: HTTP/1.1
47-
status_code: 200
55+
status:
56+
code: 200
57+
message: OK
4858
version: 1

tests/cassettes/test_async_client_request_auth.yaml

+18-8
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ interactions:
1717
method: GET
1818
uri: https://api.notion.com/v1/users
1919
response:
20-
content: '{"object":"error","status":401,"code":"unauthorized","message":"API
21-
token is invalid.","request_id":"649c77c8-264f-4e74-a2c9-4a1c6adf08ec"}'
20+
body:
21+
string: '{"object":"error","status":401,"code":"unauthorized","message":"API
22+
token is invalid.","request_id":"a3e6c161-51f0-47e2-a7ec-055e724f444b"}'
2223
headers: {}
23-
http_version: HTTP/1.1
24-
status_code: 401
24+
status:
25+
code: 401
26+
message: Unauthorized
2527
- request:
2628
body: ''
2729
headers:
@@ -40,9 +42,17 @@ interactions:
4042
method: GET
4143
uri: https://api.notion.com/v1/users
4244
response:
43-
content: '{"object":"list","results":[{"object":"user","id":"a4f789cc-7bc8-4cf0-82b9-a8ba7d985ecf","name":"Guillaume
44-
Gelin","avatar_url":"https://s3-us-west-2.amazonaws.com/public.notion-static.com/01d7053d-e135-4f27-bba0-5de532d39296/ramnes3.jpeg","type":"person","person":{"email":"[email protected]"}},{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78","name":"notion-sdk-py","avatar_url":null,"type":"bot","bot":{"owner":{"type":"workspace","workspace":true},"workspace_name":"notion-sdk-py"}}],"next_cursor":null,"has_more":false,"type":"user","user":{},"request_id":"a1e1dc6c-d7e2-4e5f-856b-cd1414e7c987"}'
45+
body:
46+
string: !!binary |
47+
H4sIAAAAAAAAAwAAAP//dFLbbpwwEP2Vap4ZlsWAsZ/ylo+oIjSYoSExmPqSbYr494rN5qKqffEc
48+
+cg6F88Grn9iE0GDnUKEDDyHZGMA/X375FJgDxlMA2igapStMgZlb1qszFhgW/YKqe1JDqqt2YyQ
49+
wUIzg4b7NFlLaeZv92ynBTKgF4rku+QtaHiMcQ36dAoCU8ALh4hlTjP9dgtdQm7cfFpTbyeTLy5O
50+
bsEQKU7mShTnQRa1GJDPosZqLCX2PRVYD1yLchCqVM3J07xwEPnTyj8gg/i6Hq5W9sEdZm5Ab8Az
51+
TYejN527t3c5J9j37D9NSCnrUZDAVokRKzES9k1ZY9UUpjkXqjKy/WziPcDwjOvrXz0sydoPc707
52+
/uE49QbusrA/wI28OP8cVjIM2Reso0+8f7np/im67w8ZLPwrdib54Py78COFbnaeQY9kA384uYW9
53+
Dr3tx3L8TBxid43ftmJUJVXYFHWBVd8wqpoUUikrrko51M0Z9j8AAAD//wMA4+wsRmICAAA=
4554
headers: {}
46-
http_version: HTTP/1.1
47-
status_code: 200
55+
status:
56+
code: 200
57+
message: OK
4858
version: 1

tests/cassettes/test_async_collect_paginated_api.yaml

+21-6
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,20 @@ interactions:
2121
method: POST
2222
uri: https://api.notion.com/v1/search
2323
response:
24-
content: '{"object":"list","results":[{"object":"page","id":"95ba0116-6776-4c19-9e45-54e77415f03b","created_time":"2023-06-29T12:47:00.000Z","last_edited_time":"2024-12-30T17:22:00.000Z","created_by":{"object":"user","id":"a4f789cc-7bc8-4cf0-82b9-a8ba7d985ecf"},"last_edited_by":{"object":"user","id":"7775f3a3-893f-43fa-b625-460c61094c78"},"cover":null,"icon":null,"parent":{"type":"workspace","workspace":true},"archived":false,"in_trash":false,"properties":{"title":{"id":"title","type":"title","title":[]}},"url":"https://www.notion.so/95ba011667764c199e4554e77415f03b","public_url":null}],"next_cursor":null,"has_more":false,"type":"page_or_database","page_or_database":{},"request_id":"42e3d551-2338-49d2-9d1b-705340893950"}'
24+
body:
25+
string: !!binary |
26+
H4sIAAAAAAAAAwAAAP//fJLRbuQgDEX/xc9hhiQQAt/Rp62qCIjZYZuGLJBOq1H+vWJmM213pX2z
27+
wbq+9vEFgvmFNoOCyacMFURM65QTqMfL59+ifyJU4EdQILnRtK470gnREWZrSSQyTjhDIVjNHW0N
28+
VGAj6ozjkP0LgoKGNi2hHWnkQ90oJhSlB0rpD6hg0ikPOPrv1YzUDWnpQy1Uy79U77rmHdQXh2vC
29+
uDvUzIleWkuEsT1h1lHSN0YS3RstRtlztA62743/IyeE4K7VLell6whrnSamazhhHbVdTSWzoi9y
30+
NrxiBDWv01SBt2He40VHnHPRz+9LGe8c4nNatC07/YxVjituFehoT/4VR1BOTwkr8POQo06n+8MS
31+
w4Ixe0xXUZ8nLMHV7S2r9lb39Fb0+LRtFaxxAgWnnJekjsfz+XyYQ/ZhPqRw3PEWugVuYfsX2mU1
32+
k7fDVaVMuD1VMONbHuwaU7iv4KTT8BIi3m3/sVSOaQhxGHXWRqfi7p8nddnKKf5eMeXhRoEywwpF
33+
zsvZUSeI4bohnWiE5axtrJOwfQAAAP//AwANv0Nh0AIAAA==
2534
headers: {}
26-
http_version: HTTP/1.1
27-
status_code: 200
35+
status:
36+
code: 200
37+
message: OK
2838
- request:
2939
body: '{"query":"This should have no results"}'
3040
headers:
@@ -47,8 +57,13 @@ interactions:
4757
method: POST
4858
uri: https://api.notion.com/v1/search
4959
response:
50-
content: '{"object":"list","results":[],"next_cursor":null,"has_more":false,"type":"page_or_database","page_or_database":{},"request_id":"d71d978b-b503-4577-9709-68365c8ddcfd"}'
60+
body:
61+
string: !!binary |
62+
H4sIAAAAAAAAA2TNQQ6CMBAF0Lv8dbsoQoBexZhmoINiKtXONNEQ7m5cu32btyNPd54VHmkVhUFh
63+
qUkF/nwx2PitYa5FcoHfakoGN5LwyIXhF0rCBvp5MjyedOWQS4ikNJEwzD/5/fgFr8qiYY3w6OPg
64+
4riMlvuObcvO2aHpWtu3dOqaxbmRZhxfAAAA//8DAOf7jmamAAAA
5165
headers: {}
52-
http_version: HTTP/1.1
53-
status_code: 200
66+
status:
67+
code: 200
68+
message: OK
5469
version: 1

0 commit comments

Comments
 (0)