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 #1130 from H4CKY54CK/master
Added emoji permission support
- Loading branch information
Showing
12 changed files
with
1,543 additions
and
453 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
168 changes: 26 additions & 142 deletions
168
tests/integration/cassettes/TestEmoji.test__fetch.json
Large diffs are not rendered by default.
Oops, something went wrong.
202 changes: 43 additions & 159 deletions
202
tests/integration/cassettes/TestEmoji.test__fetch__invalid_emoji.json
Large diffs are not rendered by default.
Oops, something went wrong.
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,223 @@ | ||
{ | ||
"http_interactions": [ | ||
{ | ||
"recorded_at": "2020-02-08T08:37:36", | ||
"request": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "grant_type=password&password=<PASSWORD>&username=<USERNAME>" | ||
}, | ||
"headers": { | ||
"Accept": [ | ||
"*/*" | ||
], | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"Basic <BASIC_AUTH>" | ||
], | ||
"Connection": [ | ||
"keep-alive" | ||
], | ||
"Content-Length": [ | ||
"59" | ||
], | ||
"Content-Type": [ | ||
"application/x-www-form-urlencoded" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> PRAW/7.0.0.dev0 prawcore/1.0.1" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://www.reddit.com/api/v1/access_token" | ||
}, | ||
"response": { | ||
"body": { | ||
"encoding": "UTF-8", | ||
"string": "{\"access_token\": \"<ACCESS_TOKEN>\", \"token_type\": \"bearer\", \"expires_in\": 3600, \"scope\": \"*\"}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": [ | ||
"bytes" | ||
], | ||
"Connection": [ | ||
"keep-alive" | ||
], | ||
"Content-Length": [ | ||
"113" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=UTF-8" | ||
], | ||
"Date": [ | ||
"Sat, 08 Feb 2020 08:37:36 GMT" | ||
], | ||
"Server": [ | ||
"snooserv" | ||
], | ||
"Set-Cookie": [ | ||
"edgebucket=u8Hc26P8bvtRks1HfM; Domain=reddit.com; Max-Age=63071999; Path=/; secure" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=15552000; includeSubDomains; preload" | ||
], | ||
"Via": [ | ||
"1.1 varnish" | ||
], | ||
"X-Cache": [ | ||
"MISS" | ||
], | ||
"X-Cache-Hits": [ | ||
"0" | ||
], | ||
"X-Moose": [ | ||
"majestic" | ||
], | ||
"X-Served-By": [ | ||
"cache-lax8639-LAX" | ||
], | ||
"X-Timer": [ | ||
"S1581151056.258717,VS0,VE357" | ||
], | ||
"cache-control": [ | ||
"max-age=0, must-revalidate" | ||
], | ||
"x-content-type-options": [ | ||
"nosniff" | ||
], | ||
"x-frame-options": [ | ||
"SAMEORIGIN" | ||
], | ||
"x-xss-protection": [ | ||
"1; mode=block" | ||
] | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
}, | ||
{ | ||
"recorded_at": "2020-02-08T08:37:36", | ||
"request": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "api_type=json&mod_flair_only=False&name=test_png&post_flair_allowed=True&user_flair_allowed=True" | ||
}, | ||
"headers": { | ||
"Accept": [ | ||
"*/*" | ||
], | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"bearer <ACCESS_TOKEN>" | ||
], | ||
"Connection": [ | ||
"keep-alive" | ||
], | ||
"Content-Length": [ | ||
"96" | ||
], | ||
"Content-Type": [ | ||
"application/x-www-form-urlencoded" | ||
], | ||
"Cookie": [ | ||
"edgebucket=u8Hc26P8bvtRks1HfM" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> PRAW/7.0.0.dev0 prawcore/1.0.1" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://oauth.reddit.com/api/v1/<TEST_SUBREDDIT>/emoji_permissions?raw_json=1" | ||
}, | ||
"response": { | ||
"body": { | ||
"encoding": "UTF-8", | ||
"string": "{\"json\": {\"errors\": []}}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": [ | ||
"bytes" | ||
], | ||
"Connection": [ | ||
"keep-alive" | ||
], | ||
"Content-Length": [ | ||
"24" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=UTF-8" | ||
], | ||
"Date": [ | ||
"Sat, 08 Feb 2020 08:37:36 GMT" | ||
], | ||
"Server": [ | ||
"snooserv" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=15552000; includeSubDomains; preload" | ||
], | ||
"Via": [ | ||
"1.1 varnish" | ||
], | ||
"X-Cache": [ | ||
"MISS" | ||
], | ||
"X-Cache-Hits": [ | ||
"0" | ||
], | ||
"X-Moose": [ | ||
"majestic" | ||
], | ||
"X-Served-By": [ | ||
"cache-lax8637-LAX" | ||
], | ||
"X-Timer": [ | ||
"S1581151057.828026,VS0,VE104" | ||
], | ||
"cache-control": [ | ||
"private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate" | ||
], | ||
"expires": [ | ||
"-1" | ||
], | ||
"set-cookie": [ | ||
"loid=00000000000004cixf.2.1284611485984.Z0FBQUFBQmVQbk5RVWR0QU41RjNtRDRpNk5Db3NOZXVkeUZqZ1lwUU1WSXBFekNEWmQwMFBFVzdvRThMWFFnbVZxMUxGTnBsblA5NHJZbWZ4QXBmSWU1OXhhTFNfR0VnbVIwaEZ4N3ZQWWxxNFFSQ0RfdmxNR2pGV3pqaTlNd0UwRFhNUVRWbTNXcUo; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Mon, 07-Feb-2022 08:37:36 GMT; secure", | ||
"session_tracker=F7MrXfFASxwroLmGSB.0.1581151056883.Z0FBQUFBQmVQbk5RYTdBMXNJbXh6Mk8wQV9hTU9nQ281UVRfTTFFdlF4T3IxazgwcS03OVoyOUwydUpkU1dGd3VoTzUzd3BkeTYtTUFNdXlCT01rRDFHWWJLRmZ0WGJ1S3VOcE5na3E2Ym5MeGVLZkRfQnJMaHd5Z2RucXJFR2RxT2Y1NVhlM1JfVzI; Domain=reddit.com; Max-Age=7199; Path=/; expires=Sat, 08-Feb-2020 10:37:36 GMT; secure" | ||
], | ||
"x-content-type-options": [ | ||
"nosniff" | ||
], | ||
"x-frame-options": [ | ||
"SAMEORIGIN" | ||
], | ||
"x-ratelimit-remaining": [ | ||
"599.0" | ||
], | ||
"x-ratelimit-reset": [ | ||
"144" | ||
], | ||
"x-ratelimit-used": [ | ||
"1" | ||
], | ||
"x-xss-protection": [ | ||
"1; mode=block" | ||
] | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://oauth.reddit.com/api/v1/<TEST_SUBREDDIT>/emoji_permissions?raw_json=1" | ||
} | ||
} | ||
], | ||
"recorded_with": "betamax/0.8.1" | ||
} |
Oops, something went wrong.