-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #107 from praw-dev/trust
- Loading branch information
Showing
7 changed files
with
527 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
238 changes: 238 additions & 0 deletions
238
tests/integration/cassettes/TestRedditorListings.test_trust_and_distrust.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,238 @@ | ||
{ | ||
"interactions": [ | ||
{ | ||
"request": { | ||
"body": [ | ||
[ | ||
"grant_type", | ||
"password" | ||
], | ||
[ | ||
"password", | ||
"<PASSWORD>" | ||
], | ||
[ | ||
"username", | ||
"<USERNAME>" | ||
] | ||
], | ||
"headers": { | ||
"AUTHORIZATION": [ | ||
"Basic <BASIC_AUTH>" | ||
], | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> Async PRAW/7.2.1.dev0 asyncprawcore/2.2.0" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"access_token\": \"<ACCESS_TOKEN>\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"scope\": \"*\"}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Cache-Control": "max-age=0, must-revalidate", | ||
"Connection": "close", | ||
"Content-Length": "121", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Wed, 16 Jun 2021 23:11:00 GMT", | ||
"Server": "snooserv", | ||
"Set-Cookie": "edgebucket=HLr1AELfgZhlrI9pfX; Domain=reddit.com; Max-Age=63071999; Path=/; secure", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Clacks-Overhead": "GNU Terry Pratchett", | ||
"X-Moose": "majestic", | ||
"x-content-type-options": "nosniff", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-ratelimit-remaining": "278", | ||
"x-ratelimit-reset": "540", | ||
"x-ratelimit-used": "22", | ||
"x-xss-protection": "1; mode=block" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": [ | ||
[ | ||
"api_type", | ||
"json" | ||
], | ||
[ | ||
"name", | ||
"PyAPITestUser3" | ||
] | ||
], | ||
"headers": { | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"bearer <ACCESS_TOKEN>" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> Async PRAW/7.2.1.dev0 asyncprawcore/2.2.0" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://oauth.reddit.com/api/add_whitelisted?raw_json=1" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"json\": {\"errors\": []}}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Cache-Control": "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "24", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Wed, 16 Jun 2021 23:11:01 GMT", | ||
"Expires": "-1", | ||
"Server": "snooserv", | ||
"Set-Cookie": "session_tracker=fnrcrrppgpcrgmmrqe.0.1623885061043.Z0FBQUFBQmd5b1VGMHpzWVRIT2U4U0NVVi1HbkRZYmIwcWQ0UG9YV1pqWE0tTHI4eFE2TGd5ZWZuY0ZOWk5iYm5OMUR3MV83RmFHdWx6MEs4WVNBTmxUMFN4VDU1dDN5QVNYSzVsTUhiRGl2b0RJbjNBYjF0dUdfN0FtcU1LNU1HYWhJbUUxX0IycUU; Domain=reddit.com; Max-Age=7199; Path=/; expires=Thu, 17-Jun-2021 01:11:01 GMT; secure", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Clacks-Overhead": "GNU Terry Pratchett", | ||
"X-Moose": "majestic", | ||
"x-content-type-options": "nosniff", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-ratelimit-remaining": "598.0", | ||
"x-ratelimit-reset": "539", | ||
"x-ratelimit-used": "2", | ||
"x-ua-compatible": "IE=edge", | ||
"x-xss-protection": "1; mode=block" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://oauth.reddit.com/api/add_whitelisted?raw_json=1" | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": null, | ||
"headers": { | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"bearer <ACCESS_TOKEN>" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> Async PRAW/7.2.1.dev0 asyncprawcore/2.2.0" | ||
] | ||
}, | ||
"method": "GET", | ||
"uri": "https://oauth.reddit.com/prefs/trusted?raw_json=1" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{\"kind\": \"UserList\", \"data\": {\"children\": [{\"date\": 1623885061.0, \"rel_id\": \"r9_2no6bp\", \"name\": \"PyAPITestUser3\", \"id\": \"t2_6c1xj\"}]}}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Cache-Control": "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "135", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Wed, 16 Jun 2021 23:11:01 GMT", | ||
"Expires": "-1", | ||
"Server": "snooserv", | ||
"Set-Cookie": "csv=1; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Clacks-Overhead": "GNU Terry Pratchett", | ||
"X-Moose": "majestic", | ||
"x-content-type-options": "nosniff", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-ratelimit-remaining": "597.0", | ||
"x-ratelimit-reset": "539", | ||
"x-ratelimit-used": "3", | ||
"x-ua-compatible": "IE=edge", | ||
"x-xss-protection": "1; mode=block" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://oauth.reddit.com/prefs/trusted?raw_json=1" | ||
} | ||
}, | ||
{ | ||
"request": { | ||
"body": [ | ||
[ | ||
"api_type", | ||
"json" | ||
], | ||
[ | ||
"name", | ||
"PyAPITestUser3" | ||
] | ||
], | ||
"headers": { | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"bearer <ACCESS_TOKEN>" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> Async PRAW/7.2.1.dev0 asyncprawcore/2.2.0" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://oauth.reddit.com/api/remove_whitelisted?raw_json=1" | ||
}, | ||
"response": { | ||
"body": { | ||
"string": "{}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": "bytes", | ||
"Cache-Control": "private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate", | ||
"Connection": "keep-alive", | ||
"Content-Length": "2", | ||
"Content-Type": "application/json; charset=UTF-8", | ||
"Date": "Wed, 16 Jun 2021 23:11:01 GMT", | ||
"Expires": "-1", | ||
"Server": "snooserv", | ||
"Set-Cookie": "session_tracker=fnrcrrppgpcrgmmrqe.0.1623885061325.Z0FBQUFBQmd5b1VGWUNyTzZVYkpfLXVWa3NfcUt2ZlZqb1FzWDNqdGdBMlVUQ0NuWTFtVWFlcnc1M0tKVDZSeWdpeW1vWWp2d29nMXJreDlFY3phSlZFNU5XQXRDWDk2TEVrb2NNZ2Q5VmpMWlRtamJMcnN6N1lnNTV0TWpXU2MySEN4Sk9MRlZ0UVg; Domain=reddit.com; Max-Age=7199; Path=/; expires=Thu, 17-Jun-2021 01:11:01 GMT; secure", | ||
"Strict-Transport-Security": "max-age=15552000; includeSubDomains; preload", | ||
"Via": "1.1 varnish", | ||
"X-Clacks-Overhead": "GNU Terry Pratchett", | ||
"X-Moose": "majestic", | ||
"x-content-type-options": "nosniff", | ||
"x-frame-options": "SAMEORIGIN", | ||
"x-ratelimit-remaining": "596.0", | ||
"x-ratelimit-reset": "539", | ||
"x-ratelimit-used": "4", | ||
"x-ua-compatible": "IE=edge", | ||
"x-xss-protection": "1; mode=block" | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://oauth.reddit.com/api/remove_whitelisted?raw_json=1" | ||
} | ||
} | ||
], | ||
"recorded_at": "2021-06-16T18:11:01", | ||
"version": 1 | ||
} |
Oops, something went wrong.