Add tests, edit error messages
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
+290
@@ -0,0 +1,290 @@
|
||||
{
|
||||
"kind": "Listing",
|
||||
"data": {
|
||||
"modhash": null,
|
||||
"dist": 3,
|
||||
"children": [
|
||||
{
|
||||
"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": null,
|
||||
"user_is_muted": false,
|
||||
"user_can_flair_in_sr": null,
|
||||
"display_name": "test",
|
||||
"header_img": null,
|
||||
"title": "Testing",
|
||||
"allow_galleries": true,
|
||||
"icon_size": null,
|
||||
"primary_color": "",
|
||||
"active_user_count": null,
|
||||
"icon_img": "",
|
||||
"display_name_prefixed": "r/test",
|
||||
"accounts_active": null,
|
||||
"public_traffic": false,
|
||||
"subscribers": 8202,
|
||||
"user_flair_richtext": [],
|
||||
"videostream_links_count": 2,
|
||||
"name": "t5_2qh23",
|
||||
"quarantine": false,
|
||||
"hide_ads": false,
|
||||
"emojis_enabled": false,
|
||||
"advertiser_category": "",
|
||||
"public_description": "",
|
||||
"comment_score_hide_mins": 0,
|
||||
"user_has_favorited": false,
|
||||
"user_flair_template_id": null,
|
||||
"community_icon": "",
|
||||
"banner_background_image": "",
|
||||
"original_content_tag_enabled": false,
|
||||
"submit_text": "",
|
||||
"description_html": "<!-- SC_OFF --><div class=\"md\"><p>This is a place to test things.</p>\n</div><!-- SC_ON -->",
|
||||
"spoilers_enabled": true,
|
||||
"header_title": null,
|
||||
"header_size": null,
|
||||
"user_flair_position": "right",
|
||||
"all_original_content": false,
|
||||
"has_menu_widget": false,
|
||||
"is_enrolled_in_new_modmail": null,
|
||||
"key_color": "",
|
||||
"can_assign_user_flair": true,
|
||||
"created": 1201266688.0,
|
||||
"wls": 6,
|
||||
"show_media_preview": true,
|
||||
"submission_type": "any",
|
||||
"user_is_subscriber": true,
|
||||
"disable_contributor_requests": false,
|
||||
"allow_videogifs": true,
|
||||
"user_flair_type": "text",
|
||||
"allow_polls": true,
|
||||
"collapse_deleted_comments": false,
|
||||
"emojis_custom_size": null,
|
||||
"public_description_html": null,
|
||||
"allow_videos": true,
|
||||
"is_crosspostable_subreddit": true,
|
||||
"suggested_comment_sort": null,
|
||||
"can_assign_link_flair": true,
|
||||
"accounts_active_is_fuzzed": false,
|
||||
"submit_text_label": null,
|
||||
"link_flair_position": "left",
|
||||
"user_sr_flair_enabled": null,
|
||||
"user_flair_enabled_in_sr": false,
|
||||
"allow_chat_post_creation": false,
|
||||
"allow_discovery": true,
|
||||
"user_sr_theme_enabled": true,
|
||||
"link_flair_enabled": true,
|
||||
"subreddit_type": "public",
|
||||
"notification_level": "low",
|
||||
"banner_img": "",
|
||||
"user_flair_text": null,
|
||||
"banner_background_color": "",
|
||||
"show_media": true,
|
||||
"id": "2qh23",
|
||||
"user_is_contributor": false,
|
||||
"over18": false,
|
||||
"description": "This is a place to test things.",
|
||||
"is_chat_post_feature_enabled": true,
|
||||
"submit_link_label": null,
|
||||
"user_flair_text_color": null,
|
||||
"restrict_commenting": false,
|
||||
"user_flair_css_class": null,
|
||||
"allow_images": true,
|
||||
"lang": "en",
|
||||
"whitelist_status": "all_ads",
|
||||
"url": "/r/test/",
|
||||
"created_utc": 1201237888.0,
|
||||
"banner_size": null,
|
||||
"mobile_banner_image": "",
|
||||
"user_is_moderator": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "t3",
|
||||
"data": {
|
||||
"approved_at_utc": null,
|
||||
"subreddit": "test",
|
||||
"selftext": "This is some text",
|
||||
"author_fullname": "t2_164ab8",
|
||||
"saved": false,
|
||||
"mod_reason_title": null,
|
||||
"gilded": 0,
|
||||
"clicked": false,
|
||||
"title": "This is a title",
|
||||
"link_flair_richtext": [],
|
||||
"subreddit_name_prefixed": "r/test",
|
||||
"hidden": false,
|
||||
"pwls": 6,
|
||||
"link_flair_css_class": null,
|
||||
"downs": 0,
|
||||
"thumbnail_height": null,
|
||||
"top_awarded_type": null,
|
||||
"hide_score": false,
|
||||
"name": "t3_i2gvg4",
|
||||
"quarantine": false,
|
||||
"link_flair_text_color": "dark",
|
||||
"upvote_ratio": 1.0,
|
||||
"author_flair_background_color": null,
|
||||
"subreddit_type": "public",
|
||||
"ups": 1,
|
||||
"total_awards_received": 0,
|
||||
"media_embed": {},
|
||||
"thumbnail_width": null,
|
||||
"author_flair_template_id": null,
|
||||
"is_original_content": false,
|
||||
"user_reports": [],
|
||||
"secure_media": null,
|
||||
"is_reddit_media_domain": false,
|
||||
"is_meta": false,
|
||||
"category": null,
|
||||
"secure_media_embed": {},
|
||||
"link_flair_text": null,
|
||||
"can_mod_post": false,
|
||||
"score": 1,
|
||||
"approved_by": null,
|
||||
"author_premium": false,
|
||||
"thumbnail": "self",
|
||||
"edited": false,
|
||||
"author_flair_css_class": null,
|
||||
"author_flair_richtext": [],
|
||||
"gildings": {},
|
||||
"content_categories": null,
|
||||
"is_self": true,
|
||||
"mod_note": null,
|
||||
"created": 1596421388.0,
|
||||
"link_flair_type": "text",
|
||||
"wls": 6,
|
||||
"removed_by_category": null,
|
||||
"banned_by": null,
|
||||
"author_flair_type": "text",
|
||||
"domain": "self.test",
|
||||
"allow_live_comments": false,
|
||||
"selftext_html": "<!-- SC_OFF --><div class=\"md\"><p>This is some text</p>\n</div><!-- SC_ON -->",
|
||||
"likes": true,
|
||||
"suggested_sort": null,
|
||||
"banned_at_utc": null,
|
||||
"view_count": null,
|
||||
"archived": false,
|
||||
"no_follow": false,
|
||||
"is_crosspostable": true,
|
||||
"pinned": false,
|
||||
"over_18": false,
|
||||
"all_awardings": [],
|
||||
"awarders": [],
|
||||
"media_only": false,
|
||||
"can_gild": false,
|
||||
"spoiler": false,
|
||||
"locked": false,
|
||||
"author_flair_text": null,
|
||||
"treatment_tags": [],
|
||||
"rte_mode": "markdown",
|
||||
"visited": false,
|
||||
"removed_by": null,
|
||||
"num_reports": null,
|
||||
"distinguished": null,
|
||||
"subreddit_id": "t5_2qh23",
|
||||
"mod_reason_by": null,
|
||||
"removal_reason": null,
|
||||
"link_flair_background_color": "",
|
||||
"id": "i2gvg4",
|
||||
"is_robot_indexable": true,
|
||||
"report_reasons": null,
|
||||
"author": "v_95",
|
||||
"discussion_type": null,
|
||||
"num_comments": 1,
|
||||
"send_replies": true,
|
||||
"whitelist_status": "all_ads",
|
||||
"contest_mode": false,
|
||||
"mod_reports": [],
|
||||
"author_patreon_flair": false,
|
||||
"author_flair_text_color": null,
|
||||
"permalink": "/r/test/comments/i2gvg4/this_is_a_title/",
|
||||
"parent_whitelist_status": "all_ads",
|
||||
"stickied": false,
|
||||
"url": "https://www.reddit.com/r/test/comments/i2gvg4/this_is_a_title/",
|
||||
"subreddit_subscribers": 8202,
|
||||
"created_utc": 1596392588.0,
|
||||
"num_crossposts": 0,
|
||||
"media": null,
|
||||
"is_video": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "t1",
|
||||
"data": {
|
||||
"total_awards_received": 0,
|
||||
"approved_at_utc": null,
|
||||
"edited": false,
|
||||
"mod_reason_by": null,
|
||||
"banned_by": null,
|
||||
"author_flair_type": "text",
|
||||
"removal_reason": null,
|
||||
"link_id": "t3_i2gvg4",
|
||||
"author_flair_template_id": null,
|
||||
"likes": true,
|
||||
"replies": "",
|
||||
"user_reports": [],
|
||||
"saved": false,
|
||||
"id": "g05v931",
|
||||
"banned_at_utc": null,
|
||||
"mod_reason_title": null,
|
||||
"gilded": 0,
|
||||
"archived": false,
|
||||
"no_follow": false,
|
||||
"author": "v_95",
|
||||
"can_mod_post": false,
|
||||
"created_utc": 1596417340.0,
|
||||
"send_replies": true,
|
||||
"parent_id": "t3_i2gvg4",
|
||||
"score": 1,
|
||||
"author_fullname": "t2_164ab8",
|
||||
"approved_by": null,
|
||||
"mod_note": null,
|
||||
"all_awardings": [],
|
||||
"subreddit_id": "t5_2qh23",
|
||||
"body": "Test comment",
|
||||
"awarders": [],
|
||||
"author_flair_css_class": null,
|
||||
"name": "t1_g05v931",
|
||||
"author_patreon_flair": false,
|
||||
"downs": 0,
|
||||
"author_flair_richtext": [],
|
||||
"is_submitter": true,
|
||||
"body_html": "<div class=\"md\"><p>Test comment</p>\n</div>",
|
||||
"gildings": {},
|
||||
"collapsed_reason": null,
|
||||
"distinguished": null,
|
||||
"associated_award": null,
|
||||
"stickied": false,
|
||||
"author_premium": false,
|
||||
"can_gild": false,
|
||||
"top_awarded_type": null,
|
||||
"author_flair_text_color": null,
|
||||
"score_hidden": false,
|
||||
"permalink": "/r/test/comments/i2gvg4/this_is_a_title/g05v931/",
|
||||
"num_reports": null,
|
||||
"locked": false,
|
||||
"report_reasons": null,
|
||||
"created": 1596446140.0,
|
||||
"subreddit": "test",
|
||||
"author_flair_text": null,
|
||||
"treatment_tags": [],
|
||||
"rte_mode": "markdown",
|
||||
"collapsed": false,
|
||||
"subreddit_name_prefixed": "r/test",
|
||||
"controversiality": 0,
|
||||
"author_flair_background_color": null,
|
||||
"collapsed_because_crowd_control": null,
|
||||
"mod_reports": [],
|
||||
"subreddit_type": "public",
|
||||
"ups": 1
|
||||
}
|
||||
}
|
||||
],
|
||||
"after": null,
|
||||
"before": null
|
||||
}
|
||||
}
|
||||
Vendored
+232
@@ -0,0 +1,232 @@
|
||||
{
|
||||
"kind": "Listing",
|
||||
"data": {
|
||||
"modhash": null,
|
||||
"dist": 2,
|
||||
"children": [
|
||||
{
|
||||
"kind": "t3",
|
||||
"data": {
|
||||
"approved_at_utc": null,
|
||||
"subreddit": "test",
|
||||
"selftext": "This is some text",
|
||||
"author_fullname": "t2_164ab8",
|
||||
"saved": false,
|
||||
"mod_reason_title": null,
|
||||
"gilded": 0,
|
||||
"clicked": false,
|
||||
"title": "This is a title",
|
||||
"link_flair_richtext": [],
|
||||
"subreddit_name_prefixed": "r/test",
|
||||
"hidden": false,
|
||||
"pwls": 6,
|
||||
"link_flair_css_class": null,
|
||||
"downs": 0,
|
||||
"thumbnail_height": null,
|
||||
"top_awarded_type": null,
|
||||
"hide_score": false,
|
||||
"name": "t3_i2gvg4",
|
||||
"quarantine": false,
|
||||
"link_flair_text_color": "dark",
|
||||
"upvote_ratio": 1.0,
|
||||
"author_flair_background_color": null,
|
||||
"subreddit_type": "public",
|
||||
"ups": 1,
|
||||
"total_awards_received": 0,
|
||||
"media_embed": {},
|
||||
"thumbnail_width": null,
|
||||
"author_flair_template_id": null,
|
||||
"is_original_content": false,
|
||||
"user_reports": [],
|
||||
"secure_media": null,
|
||||
"is_reddit_media_domain": false,
|
||||
"is_meta": false,
|
||||
"category": null,
|
||||
"secure_media_embed": {},
|
||||
"link_flair_text": null,
|
||||
"can_mod_post": false,
|
||||
"score": 1,
|
||||
"approved_by": null,
|
||||
"author_premium": false,
|
||||
"thumbnail": "self",
|
||||
"edited": false,
|
||||
"author_flair_css_class": null,
|
||||
"author_flair_richtext": [],
|
||||
"gildings": {},
|
||||
"content_categories": null,
|
||||
"is_self": true,
|
||||
"mod_note": null,
|
||||
"created": 1596421388.0,
|
||||
"link_flair_type": "text",
|
||||
"wls": 6,
|
||||
"removed_by_category": null,
|
||||
"banned_by": null,
|
||||
"author_flair_type": "text",
|
||||
"domain": "self.test",
|
||||
"allow_live_comments": false,
|
||||
"selftext_html": "<!-- SC_OFF --><div class=\"md\"><p>This is some text</p>\n</div><!-- SC_ON -->",
|
||||
"likes": true,
|
||||
"suggested_sort": null,
|
||||
"banned_at_utc": null,
|
||||
"view_count": null,
|
||||
"archived": false,
|
||||
"no_follow": false,
|
||||
"is_crosspostable": true,
|
||||
"pinned": false,
|
||||
"over_18": false,
|
||||
"all_awardings": [],
|
||||
"awarders": [],
|
||||
"media_only": false,
|
||||
"can_gild": false,
|
||||
"spoiler": false,
|
||||
"locked": false,
|
||||
"author_flair_text": null,
|
||||
"treatment_tags": [],
|
||||
"rte_mode": "markdown",
|
||||
"visited": false,
|
||||
"removed_by": null,
|
||||
"num_reports": null,
|
||||
"distinguished": null,
|
||||
"subreddit_id": "t5_2qh23",
|
||||
"mod_reason_by": null,
|
||||
"removal_reason": null,
|
||||
"link_flair_background_color": "",
|
||||
"id": "i2gvg4",
|
||||
"is_robot_indexable": true,
|
||||
"report_reasons": null,
|
||||
"author": "v_95",
|
||||
"discussion_type": null,
|
||||
"num_comments": 1,
|
||||
"send_replies": true,
|
||||
"whitelist_status": "all_ads",
|
||||
"contest_mode": false,
|
||||
"mod_reports": [],
|
||||
"author_patreon_flair": false,
|
||||
"author_flair_text_color": null,
|
||||
"permalink": "/r/test/comments/i2gvg4/this_is_a_title/",
|
||||
"parent_whitelist_status": "all_ads",
|
||||
"stickied": false,
|
||||
"url": "https://www.reddit.com/r/test/comments/i2gvg4/this_is_a_title/",
|
||||
"subreddit_subscribers": 8201,
|
||||
"created_utc": 1596392588.0,
|
||||
"num_crossposts": 0,
|
||||
"media": null,
|
||||
"is_video": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "t3",
|
||||
"data": {
|
||||
"approved_at_utc": null,
|
||||
"subreddit": "test",
|
||||
"selftext": "",
|
||||
"author_fullname": "t2_164ab8",
|
||||
"saved": false,
|
||||
"mod_reason_title": null,
|
||||
"gilded": 0,
|
||||
"clicked": false,
|
||||
"title": "This is a title",
|
||||
"link_flair_richtext": [],
|
||||
"subreddit_name_prefixed": "r/test",
|
||||
"hidden": false,
|
||||
"pwls": 6,
|
||||
"link_flair_css_class": null,
|
||||
"downs": 0,
|
||||
"thumbnail_height": null,
|
||||
"top_awarded_type": null,
|
||||
"hide_score": false,
|
||||
"name": "t3_i2gvs1",
|
||||
"quarantine": false,
|
||||
"link_flair_text_color": "dark",
|
||||
"upvote_ratio": 1.0,
|
||||
"author_flair_background_color": null,
|
||||
"subreddit_type": "public",
|
||||
"ups": 1,
|
||||
"total_awards_received": 0,
|
||||
"media_embed": {},
|
||||
"thumbnail_width": null,
|
||||
"author_flair_template_id": null,
|
||||
"is_original_content": false,
|
||||
"user_reports": [],
|
||||
"secure_media": null,
|
||||
"is_reddit_media_domain": false,
|
||||
"is_meta": false,
|
||||
"category": null,
|
||||
"secure_media_embed": {},
|
||||
"link_flair_text": null,
|
||||
"can_mod_post": false,
|
||||
"score": 1,
|
||||
"approved_by": null,
|
||||
"author_premium": false,
|
||||
"thumbnail": "default",
|
||||
"edited": false,
|
||||
"author_flair_css_class": null,
|
||||
"author_flair_richtext": [],
|
||||
"gildings": {},
|
||||
"content_categories": null,
|
||||
"is_self": false,
|
||||
"mod_note": null,
|
||||
"created": 1596421417.0,
|
||||
"link_flair_type": "text",
|
||||
"wls": 6,
|
||||
"removed_by_category": null,
|
||||
"banned_by": null,
|
||||
"author_flair_type": "text",
|
||||
"domain": "example.com",
|
||||
"allow_live_comments": false,
|
||||
"selftext_html": null,
|
||||
"likes": true,
|
||||
"suggested_sort": null,
|
||||
"banned_at_utc": null,
|
||||
"url_overridden_by_dest": "http://example.com",
|
||||
"view_count": null,
|
||||
"archived": false,
|
||||
"no_follow": false,
|
||||
"is_crosspostable": true,
|
||||
"pinned": false,
|
||||
"over_18": false,
|
||||
"all_awardings": [],
|
||||
"awarders": [],
|
||||
"media_only": false,
|
||||
"can_gild": false,
|
||||
"spoiler": false,
|
||||
"locked": false,
|
||||
"author_flair_text": null,
|
||||
"treatment_tags": [],
|
||||
"rte_mode": "markdown",
|
||||
"visited": false,
|
||||
"removed_by": null,
|
||||
"num_reports": null,
|
||||
"distinguished": null,
|
||||
"subreddit_id": "t5_2qh23",
|
||||
"mod_reason_by": null,
|
||||
"removal_reason": null,
|
||||
"link_flair_background_color": "",
|
||||
"id": "i2gvs1",
|
||||
"is_robot_indexable": true,
|
||||
"report_reasons": null,
|
||||
"author": "v_95",
|
||||
"discussion_type": null,
|
||||
"num_comments": 0,
|
||||
"send_replies": false,
|
||||
"whitelist_status": "all_ads",
|
||||
"contest_mode": false,
|
||||
"mod_reports": [],
|
||||
"author_patreon_flair": false,
|
||||
"author_flair_text_color": null,
|
||||
"permalink": "/r/test/comments/i2gvs1/this_is_a_title/",
|
||||
"parent_whitelist_status": "all_ads",
|
||||
"stickied": false,
|
||||
"url": "http://example.com",
|
||||
"subreddit_subscribers": 8201,
|
||||
"created_utc": 1596392617.0,
|
||||
"num_crossposts": 0,
|
||||
"media": null,
|
||||
"is_video": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"after": null,
|
||||
"before": null
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user