Skip to content

test: vcr for test_status #466

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 143 additions & 0 deletions tests/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
interactions:
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- python-requests/2.22.0
method: GET
uri: https://app-router.com/2/route?appId=8FfQwpvihLHK4htqmtEvkNrv
response:
body:
string: '{"ttl":3600,"stats_server":"8ffqwpvi.stats.lncldglobal.com","rtm_router_server":"8ffqwpvi.rtm.lncldglobal.com","push_server":"8ffqwpvi.push.lncldglobal.com","play_server":"8ffqwpvi.play.lncldglobal.com","engine_server":"8ffqwpvi.engine.lncldglobal.com","api_server":"8ffqwpvi.api.lncldglobal.com"}'
headers:
Connection:
- close
Content-Length:
- '297'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 26 Apr 2020 05:05:30 GMT
Server:
- openresty
Vary:
- Accept-Encoding
access-control-allow-credentials:
- 'true'
access-control-allow-origin:
- '*'
access-control-expose-headers:
- ''
cache-control:
- public,max-age=3600
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-request-id:
- 6c4aac8a9f27c8f6b2e42a294fcbfc17
x-xss-protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: '{"username":"user1_name","password":"password","email":"[email protected]","mobilePhoneNumber":"18611111111"}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '111'
Content-Type:
- application/json;charset=utf-8
User-Agent:
- AVOS Cloud python-2.1.9 SDK
X-LC-Id:
- 8FfQwpvihLHK4htqmtEvkNrv
X-LC-Prod:
- '1'
X-LC-Sign:
- 6cb7e4c8ea65a3cb9c0d54b5f2307630,1587877530775
method: POST
uri: https://8ffqwpvi.api.lncldglobal.com/1.1/classes/_User?fetchWhenSave=false
response:
body:
string: '{"email":"[email protected]","sessionToken":"0ffhmqs8myp3kyrfn0kk3lqrd","updatedAt":"2020-04-26T05:05:32.535Z","objectId":"5ea5169c2f040b00087f4d94","username":"user1_name","createdAt":"2020-04-26T05:05:32.535Z","emailVerified":false,"mobilePhoneNumber":"18611111111","mobilePhoneVerified":false}'
headers:
Cache-Control:
- no-cache,no-store
Connection:
- keep-alive
Content-Type:
- application/json;charset=utf-8
Date:
- Sun, 26 Apr 2020 05:05:32 GMT
Location:
- /1.1/classes/_User/5ea5169c2f040b00087f4d94
Pragma:
- no-cache
Server:
- openresty
status:
code: 201
message: Created
- request:
body: '{}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '2'
Content-Type:
- application/json;charset=utf-8
User-Agent:
- AVOS Cloud python-2.1.9 SDK
X-LC-Id:
- 8FfQwpvihLHK4htqmtEvkNrv
X-LC-Prod:
- '1'
X-LC-Sign:
- abf0817347fd69aaeb1e68491d15bb72,1587877549304,master
method: DELETE
uri: https://8ffqwpvi.api.lncldglobal.com/1.1/classes/_User/5ea5169c2f040b00087f4d94
response:
body:
string: !!binary |
H4sIAAAAAAAAA6uuBQBDv6ajAgAAAA==
headers:
Cache-Control:
- no-cache,no-store
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json;charset=utf-8
Date:
- Sun, 26 Apr 2020 05:05:51 GMT
Pragma:
- no-cache
Server:
- openresty
Transfer-Encoding:
- chunked
Vary:
- Accept-Encoding
status:
code: 200
message: OK
version: 1
103 changes: 103 additions & 0 deletions tests/test_inbox_query
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
interactions:
- request:
body: '{"inboxType":"private","data":{"image":"http://www.example.com","message":"hello
world!"},"query":{"where":{"objectId":"5ea5169c2f040b00087f4d94"},"className":"_User"},"source":{"__type":"Pointer","className":"_User","objectId":"5ea5169c2f040b00087f4d94"}}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '256'
Content-Type:
- application/json;charset=utf-8
User-Agent:
- AVOS Cloud python-2.1.9 SDK
X-LC-Id:
- 8FfQwpvihLHK4htqmtEvkNrv
X-LC-Prod:
- '1'
X-LC-Session:
- 0ffhmqs8myp3kyrfn0kk3lqrd
X-LC-Sign:
- 3939b45f606a0973da95e1dbeda92bf9,1587877543983
method: POST
uri: https://8ffqwpvi.api.lncldglobal.com/1.1/statuses
response:
body:
string: '{"objectId":"5ea516a92f040b00087f4d9b","createdAt":"2020-04-26T05:05:45.653Z"}'
headers:
Cache-Control:
- no-cache,no-store
Connection:
- keep-alive
Content-Type:
- application/json;charset=utf-8
Date:
- Sun, 26 Apr 2020 05:05:45 GMT
Location:
- /1.1/classes/_Status/5ea516a92f040b00087f4d9b
Pragma:
- no-cache
Server:
- openresty
Transfer-Encoding:
- chunked
status:
code: 201
message: Created
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Type:
- application/json;charset=utf-8
User-Agent:
- AVOS Cloud python-2.1.9 SDK
X-LC-Id:
- 8FfQwpvihLHK4htqmtEvkNrv
X-LC-Prod:
- '1'
X-LC-Session:
- 0ffhmqs8myp3kyrfn0kk3lqrd
X-LC-Sign:
- 7c29f2b1e2151e8fc5565bce9cc79103,1587877545910
method: GET
uri: https://8ffqwpvi.api.lncldglobal.com/1.1/subscribe/statuses?where=%7B%7D&owner=%7B%22__type%22%3A%22Pointer%22%2C%22className%22%3A%22_User%22%2C%22objectId%22%3A%225ea5169c2f040b00087f4d94%22%7D&inboxType=private&sinceId=0&maxId=0&limit=1
response:
body:
string: !!binary |
H4sIAAAAAAAAA43OvQ6CMBQF4FfRzvxcK0Vhc3RnUhwKvSimpU0pgiG8uyUxcTW5w8k533BnYrEf
pOtJfp1Jq/gdSU4ezpm8jMt4HMcIJ66MxKjWigREYd9/EUqpN6O2Umz90HaVnoq3WSdj2xd36Nva
og/i5HxLgUIISUjTAljuL2FRyvYXzwYj/mG6emLtzsIrhpztUp7RBhKoAOB4aBKRVb8XV0aXW0Cw
88nZAZcPjpQLgu4AAAA=
headers:
Cache-Control:
- no-cache,no-store
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json;charset=utf-8
Date:
- Sun, 26 Apr 2020 05:05:46 GMT
Pragma:
- no-cache
Server:
- openresty
Transfer-Encoding:
- chunked
Vary:
- Accept-Encoding
status:
code: 200
message: OK
version: 1
102 changes: 102 additions & 0 deletions tests/test_send
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
interactions:
- request:
body: '{"inboxType":"privateMessage","data":{"image":"http://www.example.com","message":"hello
world!"},"query":{"where":{"username":"user1_name"},"className":"_User"},"source":{"__type":"Pointer","className":"_User","objectId":"5ea510002f040b00087f4860"}}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '249'
Content-Type:
- application/json;charset=utf-8
User-Agent:
- AVOS Cloud python-2.1.9 SDK
X-LC-Id:
- 8FfQwpvihLHK4htqmtEvkNrv
X-LC-Prod:
- '1'
X-LC-Session:
- ti7kj7y9f2hrlnk1visq6ef3i
X-LC-Sign:
- 8c38c4f8f23b85970ebd172768ba132c,1587875839747
method: POST
uri: https://8ffqwpvi.api.lncldglobal.com/1.1/statuses
response:
body:
string: '{"objectId":"5ea5100166303d0008602c5d","createdAt":"2020-04-26T04:37:21.410Z"}'
headers:
Cache-Control:
- no-cache,no-store
Connection:
- keep-alive
Content-Type:
- application/json;charset=utf-8
Date:
- Sun, 26 Apr 2020 04:37:21 GMT
Location:
- /1.1/classes/_Status/5ea5100166303d0008602c5d
Pragma:
- no-cache
Server:
- openresty
Transfer-Encoding:
- chunked
status:
code: 201
message: Created
- request:
body: 'null'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '4'
Content-Type:
- application/json;charset=utf-8
User-Agent:
- AVOS Cloud python-2.1.9 SDK
X-LC-Id:
- 8FfQwpvihLHK4htqmtEvkNrv
X-LC-Prod:
- '1'
X-LC-Session:
- ti7kj7y9f2hrlnk1visq6ef3i
X-LC-Sign:
- 548f92c47be6b6e6cb93e768b8f2b75a,1587875841272
method: DELETE
uri: https://8ffqwpvi.api.lncldglobal.com/1.1/statuses/5ea5100166303d0008602c5d
response:
body:
string: !!binary |
H4sIAAAAAAAAA6uuBQBDv6ajAgAAAA==
headers:
Cache-Control:
- no-cache,no-store
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json;charset=utf-8
Date:
- Sun, 26 Apr 2020 04:37:22 GMT
Pragma:
- no-cache
Server:
- openresty
Transfer-Encoding:
- chunked
Vary:
- Accept-Encoding
status:
code: 200
message: OK
version: 1
Loading