Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,977 additions
and
526 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
155 changes: 64 additions & 91 deletions
155
tests/integration/cassettes/TestCollectionModeration.test_delete.json
Large diffs are not rendered by default.
Oops, something went wrong.
50 changes: 25 additions & 25 deletions
50
...egration/cassettes/TestCollectionModeration.test_update_display_layout__empty_string.json
Large diffs are not rendered by default.
Oops, something went wrong.
50 changes: 25 additions & 25 deletions
50
...s/integration/cassettes/TestCollectionModeration.test_update_display_layout__gallery.json
Large diffs are not rendered by default.
Oops, something went wrong.
139 changes: 15 additions & 124 deletions
139
...ration/cassettes/TestCollectionModeration.test_update_display_layout__invalid_layout.json
Large diffs are not rendered by default.
Oops, something went wrong.
139 changes: 15 additions & 124 deletions
139
...integration/cassettes/TestCollectionModeration.test_update_display_layout__lowercase.json
Large diffs are not rendered by default.
Oops, something went wrong.
50 changes: 25 additions & 25 deletions
50
tests/integration/cassettes/TestCollectionModeration.test_update_display_layout__none.json
Large diffs are not rendered by default.
Oops, something went wrong.
50 changes: 25 additions & 25 deletions
50
.../integration/cassettes/TestCollectionModeration.test_update_display_layout__timeline.json
Large diffs are not rendered by default.
Oops, something went wrong.
325 changes: 325 additions & 0 deletions
325
...s/integration/cassettes/TestSubredditCollectionsModeration.test_create__empty_layout.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,325 @@ | ||
{ | ||
"http_interactions": [ | ||
{ | ||
"recorded_at": "2021-12-28T20:56:38", | ||
"request": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "grant_type=password&password=<PASSWORD>&username=<TEST_SUBREDDIT>_bot" | ||
}, | ||
"headers": { | ||
"Accept": [ | ||
"*/*" | ||
], | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"Basic <BASIC_AUTH>" | ||
], | ||
"Connection": [ | ||
"close" | ||
], | ||
"Content-Length": [ | ||
"65" | ||
], | ||
"Content-Type": [ | ||
"application/x-www-form-urlencoded" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> PRAW/7.5.1.dev0 prawcore/2.3.0" | ||
] | ||
}, | ||
"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": [ | ||
"close" | ||
], | ||
"Content-Length": [ | ||
"121" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=UTF-8" | ||
], | ||
"Date": [ | ||
"Tue, 28 Dec 2021 20:56:38 GMT" | ||
], | ||
"Server": [ | ||
"snooserv" | ||
], | ||
"Set-Cookie": [ | ||
"edgebucket=T1Z0b5AN9LTMtk7woS; 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" | ||
], | ||
"cache-control": [ | ||
"max-age=0, must-revalidate" | ||
], | ||
"x-content-type-options": [ | ||
"nosniff" | ||
], | ||
"x-frame-options": [ | ||
"SAMEORIGIN" | ||
], | ||
"x-ratelimit-remaining": [ | ||
"296" | ||
], | ||
"x-ratelimit-reset": [ | ||
"202" | ||
], | ||
"x-ratelimit-used": [ | ||
"4" | ||
], | ||
"x-xss-protection": [ | ||
"1; mode=block" | ||
] | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://www.reddit.com/api/v1/access_token" | ||
} | ||
}, | ||
{ | ||
"recorded_at": "2021-12-28T20:56:38", | ||
"request": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "" | ||
}, | ||
"headers": { | ||
"Accept": [ | ||
"*/*" | ||
], | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"bearer <ACCESS_TOKEN>" | ||
], | ||
"Connection": [ | ||
"keep-alive" | ||
], | ||
"Cookie": [ | ||
"edgebucket=T1Z0b5AN9LTMtk7woS" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> PRAW/7.5.1.dev0 prawcore/2.3.0" | ||
] | ||
}, | ||
"method": "GET", | ||
"uri": "https://oauth.reddit.com/r/<TEST_SUBREDDIT>/about/?raw_json=1" | ||
}, | ||
"response": { | ||
"body": { | ||
"encoding": "UTF-8", | ||
"string": "{\"kind\": \"t5\", \"data\": {\"user_flair_background_color\": null, \"submit_text_html\": null, \"restrict_posting\": true, \"user_is_banned\": false, \"free_form_reports\": true, \"wiki_enabled\": true, \"user_is_muted\": false, \"user_can_flair_in_sr\": true, \"display_name\": \"<TEST_SUBREDDIT>\", \"header_img\": null, \"title\": \"<TEST_SUBREDDIT>\", \"allow_galleries\": true, \"icon_size\": null, \"primary_color\": \"\", \"active_user_count\": 1, \"icon_img\": \"\", \"display_name_prefixed\": \"r/<TEST_SUBREDDIT>\", \"accounts_active\": 1, \"public_traffic\": false, \"subscribers\": 2, \"user_flair_richtext\": [], \"name\": \"t5_4bj4y6\", \"quarantine\": false, \"hide_ads\": false, \"prediction_leaderboard_entry_type\": \"IN_FEED\", \"emojis_enabled\": false, \"advertiser_category\": \"\", \"public_description\": \"test server\", \"comment_score_hide_mins\": 0, \"allow_predictions\": false, \"user_has_favorited\": false, \"user_flair_template_id\": null, \"community_icon\": \"\", \"banner_background_image\": \"\", \"original_content_tag_enabled\": false, \"community_reviewed\": false, \"submit_text\": \"\", \"description_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md\\\"\\u003E\\u003Cp\\u003Enothing happening here\\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"spoilers_enabled\": true, \"header_title\": \"\", \"header_size\": null, \"user_flair_position\": \"right\", \"all_original_content\": false, \"collections_enabled\": true, \"is_enrolled_in_new_modmail\": true, \"key_color\": \"\", \"event_posts_enabled\": true, \"can_assign_user_flair\": true, \"created\": 1619538895.0, \"wls\": null, \"show_media_preview\": true, \"submission_type\": \"any\", \"user_is_subscriber\": true, \"disable_contributor_requests\": false, \"allow_videogifs\": true, \"should_archive_posts\": false, \"user_flair_type\": \"text\", \"allow_polls\": true, \"collapse_deleted_comments\": false, \"coins\": 0, \"emojis_custom_size\": null, \"public_description_html\": \"\\u003C!-- SC_OFF --\\u003E\\u003Cdiv class=\\\"md\\\"\\u003E\\u003Cp\\u003Etest server\\u003C/p\\u003E\\n\\u003C/div\\u003E\\u003C!-- SC_ON --\\u003E\", \"allow_videos\": false, \"is_crosspostable_subreddit\": true, \"notification_level\": \"low\", \"can_assign_link_flair\": true, \"has_menu_widget\": false, \"accounts_active_is_fuzzed\": false, \"allow_prediction_contributors\": false, \"submit_text_label\": \"\", \"link_flair_position\": \"left\", \"user_sr_flair_enabled\": true, \"user_flair_enabled_in_sr\": true, \"allow_chat_post_creation\": true, \"allow_discovery\": true, \"accept_followers\": true, \"user_sr_theme_enabled\": true, \"link_flair_enabled\": true, \"subreddit_type\": \"private\", \"suggested_comment_sort\": null, \"banner_img\": \"\", \"user_flair_text\": null, \"banner_background_color\": \"\", \"show_media\": true, \"id\": \"4bj4y6\", \"user_is_moderator\": true, \"over18\": false, \"description\": \"nothing happening here\", \"is_chat_post_feature_enabled\": true, \"submit_link_label\": \"\", \"user_flair_text_color\": null, \"restrict_commenting\": true, \"user_flair_css_class\": null, \"allow_images\": true, \"lang\": \"en\", \"whitelist_status\": null, \"url\": \"/r/<TEST_SUBREDDIT>/\", \"created_utc\": 1619538895.0, \"banner_size\": null, \"mobile_banner_image\": \"\", \"user_is_contributor\": true, \"allow_predictions_tournament\": false}}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": [ | ||
"bytes" | ||
], | ||
"Connection": [ | ||
"keep-alive" | ||
], | ||
"Content-Length": [ | ||
"3067" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=UTF-8" | ||
], | ||
"Date": [ | ||
"Tue, 28 Dec 2021 20:56:38 GMT" | ||
], | ||
"Server": [ | ||
"snooserv" | ||
], | ||
"Set-Cookie": [ | ||
"loid=0000000000c065m068.2.1620446985356.Z0FBQUFBQmh5M29HWVBhNTl4OVcyX2JuNlJyLTU2V0NqVklkMXVVYjIyRHktMzRRVzMtVU5JZ0hOWl9xZkRVbmVRMTI5bVUzMUl5UmI4dWdXdXNLUjY3THNpZkRYMTAybGFEZkVxMzZLdXR1emhDR1J1UHhuN3BKZnFBLXZwOElZWnBNbXJ5MFlaVUE; Domain=reddit.com; Max-Age=63071999; Path=/; expires=Thu, 28-Dec-2023 20:56:38 GMT; secure; SameSite=None; Secure", | ||
"session_tracker=kmbljlajahfaohbhgr.0.1640724998902.Z0FBQUFBQmh5M29HLVlTOVVTLXJMZUZlYnZEUTNiNmZCdGVGSGllRUdIcF9tTV9taGhRVU9OdEVicVZ0YzRUX044SjBUdTM2WjBDMEFxU2VZWmJCcjlYYURTRXF2UkcxYWFHRUw5bVBJaWFnUzJtYWRNMThxT2MxYnNfenMyMDk5emJQckFzY1lHcEs; Domain=reddit.com; Max-Age=7199; Path=/; expires=Tue, 28-Dec-2021 22:56:38 GMT; secure; SameSite=None; Secure", | ||
"csv=2; Max-Age=63072000; Domain=.reddit.com; Path=/; Secure; SameSite=None" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=15552000; includeSubDomains; preload" | ||
], | ||
"Vary": [ | ||
"accept-encoding" | ||
], | ||
"Via": [ | ||
"1.1 varnish" | ||
], | ||
"X-Clacks-Overhead": [ | ||
"GNU Terry Pratchett" | ||
], | ||
"X-Moose": [ | ||
"majestic" | ||
], | ||
"cache-control": [ | ||
"private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate" | ||
], | ||
"expires": [ | ||
"-1" | ||
], | ||
"x-content-type-options": [ | ||
"nosniff" | ||
], | ||
"x-frame-options": [ | ||
"SAMEORIGIN" | ||
], | ||
"x-ratelimit-remaining": [ | ||
"595.0" | ||
], | ||
"x-ratelimit-reset": [ | ||
"202" | ||
], | ||
"x-ratelimit-used": [ | ||
"5" | ||
], | ||
"x-ua-compatible": [ | ||
"IE=edge" | ||
], | ||
"x-xss-protection": [ | ||
"1; mode=block" | ||
] | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://oauth.reddit.com/r/<TEST_SUBREDDIT>/about/?raw_json=1" | ||
} | ||
}, | ||
{ | ||
"recorded_at": "2021-12-28T20:56:39", | ||
"request": { | ||
"body": { | ||
"encoding": "utf-8", | ||
"string": "api_type=json&description=The+description.&display_layout=&sr_fullname=t5_4bj4y6&title=The+title%21" | ||
}, | ||
"headers": { | ||
"Accept": [ | ||
"*/*" | ||
], | ||
"Accept-Encoding": [ | ||
"identity" | ||
], | ||
"Authorization": [ | ||
"bearer <ACCESS_TOKEN>" | ||
], | ||
"Connection": [ | ||
"keep-alive" | ||
], | ||
"Content-Length": [ | ||
"99" | ||
], | ||
"Content-Type": [ | ||
"application/x-www-form-urlencoded" | ||
], | ||
"Cookie": [ | ||
"csv=2; edgebucket=T1Z0b5AN9LTMtk7woS; loid=0000000000c065m068.2.1620446985356.Z0FBQUFBQmh5M29HWVBhNTl4OVcyX2JuNlJyLTU2V0NqVklkMXVVYjIyRHktMzRRVzMtVU5JZ0hOWl9xZkRVbmVRMTI5bVUzMUl5UmI4dWdXdXNLUjY3THNpZkRYMTAybGFEZkVxMzZLdXR1emhDR1J1UHhuN3BKZnFBLXZwOElZWnBNbXJ5MFlaVUE; session_tracker=kmbljlajahfaohbhgr.0.1640724998902.Z0FBQUFBQmh5M29HLVlTOVVTLXJMZUZlYnZEUTNiNmZCdGVGSGllRUdIcF9tTV9taGhRVU9OdEVicVZ0YzRUX044SjBUdTM2WjBDMEFxU2VZWmJCcjlYYURTRXF2UkcxYWFHRUw5bVBJaWFnUzJtYWRNMThxT2MxYnNfenMyMDk5emJQckFzY1lHcEs" | ||
], | ||
"User-Agent": [ | ||
"<USER_AGENT> PRAW/7.5.1.dev0 prawcore/2.3.0" | ||
] | ||
}, | ||
"method": "POST", | ||
"uri": "https://oauth.reddit.com/api/v1/collections/create_collection?raw_json=1" | ||
}, | ||
"response": { | ||
"body": { | ||
"encoding": "UTF-8", | ||
"string": "{\"subreddit_id\": \"t5_4bj4y6\", \"description\": \"The description.\", \"author_name\": \"<TEST_SUBREDDIT>_bot\", \"collection_id\": \"93848bd5-1504-4603-a0b9-385dd1e7c890\", \"display_layout\": null, \"permalink\": \"https://www.reddit.com/r/<TEST_SUBREDDIT>/collection/93848bd5-1504-4603-a0b9-385dd1e7c890\", \"link_ids\": [], \"title\": \"The title!\", \"created_at_utc\": 1640724999.03, \"author_id\": \"t2_c065m068\", \"last_update_utc\": 1640724999.03}" | ||
}, | ||
"headers": { | ||
"Accept-Ranges": [ | ||
"bytes" | ||
], | ||
"Connection": [ | ||
"keep-alive" | ||
], | ||
"Content-Length": [ | ||
"406" | ||
], | ||
"Content-Type": [ | ||
"application/json; charset=UTF-8" | ||
], | ||
"Date": [ | ||
"Tue, 28 Dec 2021 20:56:39 GMT" | ||
], | ||
"Server": [ | ||
"snooserv" | ||
], | ||
"Strict-Transport-Security": [ | ||
"max-age=15552000; includeSubDomains; preload" | ||
], | ||
"Via": [ | ||
"1.1 varnish" | ||
], | ||
"X-Clacks-Overhead": [ | ||
"GNU Terry Pratchett" | ||
], | ||
"X-Moose": [ | ||
"majestic" | ||
], | ||
"cache-control": [ | ||
"private, s-maxage=0, max-age=0, must-revalidate, no-store, max-age=0, must-revalidate" | ||
], | ||
"expires": [ | ||
"-1" | ||
], | ||
"set-cookie": [ | ||
"session_tracker=kmbljlajahfaohbhgr.0.1640724999013.Z0FBQUFBQmh5M29INFBDUElSNG8wUnZMUHBvZFJpWS1ZMnhJdktjblF2X2piN0gtcmRfMGxrLWFtN1lYVHFrUVY3cDA2cFJvTjlqZW9CV0VMX2wtdi11aGFhYkdmdWF6NGNhZmVkTDhReG5mV3hrSFZ5eXBraldnNWxvTlpuWkRBTFM5RDIxTGV6N2Y; Domain=reddit.com; Max-Age=7199; Path=/; expires=Tue, 28-Dec-2021 22:56:39 GMT; secure" | ||
], | ||
"x-content-type-options": [ | ||
"nosniff" | ||
], | ||
"x-frame-options": [ | ||
"SAMEORIGIN" | ||
], | ||
"x-ratelimit-remaining": [ | ||
"594.0" | ||
], | ||
"x-ratelimit-reset": [ | ||
"201" | ||
], | ||
"x-ratelimit-used": [ | ||
"6" | ||
], | ||
"x-ua-compatible": [ | ||
"IE=edge" | ||
], | ||
"x-xss-protection": [ | ||
"1; mode=block" | ||
] | ||
}, | ||
"status": { | ||
"code": 200, | ||
"message": "OK" | ||
}, | ||
"url": "https://oauth.reddit.com/api/v1/collections/create_collection?raw_json=1" | ||
} | ||
} | ||
], | ||
"recorded_with": "betamax/0.8.1" | ||
} |
Oops, something went wrong.