Add tests

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-06-17 22:35:19 -04:00
parent 3169b4be19
commit 4c33ea3896
8 changed files with 1097 additions and 8 deletions
+89
View File
@@ -0,0 +1,89 @@
{
"kind": "Listing",
"data": {
"modhash": null,
"dist": 1,
"children": [
{
"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_d7ejpn",
"author_flair_template_id": null,
"likes": true,
"replies": "",
"user_reports": [],
"saved": false,
"id": "f0zsa37",
"banned_at_utc": null,
"mod_reason_title": null,
"gilded": 0,
"archived": true,
"no_follow": false,
"author": "v_95",
"num_comments": 89751,
"can_mod_post": false,
"created_utc": 1569101896.0,
"send_replies": true,
"parent_id": "t3_d7ejpn",
"score": 1,
"author_fullname": "t2_164ab8",
"over_18": false,
"treatment_tags": [],
"approved_by": null,
"mod_note": null,
"all_awardings": [],
"subreddit_id": "t5_2qh1f",
"body": "Thank you!",
"link_title": "I'm giving away an iPhone 11 Pro to a commenter at random to celebrate Apollo for Reddit's new iOS 13 update and as a thank you to the community! Just leave a comment on this post and the winner will be selected randomly and announced tomorrow at 8 PM GMT. Details inside, and good luck!",
"author_flair_css_class": null,
"name": "t1_f0zsa37",
"author_patreon_flair": false,
"downs": 0,
"author_flair_richtext": [],
"is_submitter": false,
"body_html": "&lt;div class=\"md\"&gt;&lt;p&gt;Thank you!&lt;/p&gt;\n&lt;/div&gt;",
"gildings": {},
"collapsed_reason": null,
"distinguished": null,
"associated_award": null,
"stickied": false,
"author_premium": false,
"can_gild": false,
"top_awarded_type": null,
"subreddit_name_prefixed": "r/apple",
"author_flair_text_color": null,
"score_hidden": false,
"permalink": "/r/apple/comments/d7ejpn/im_giving_away_an_iphone_11_pro_to_a_commenter_at/f0zsa37/",
"num_reports": null,
"link_permalink": "https://www.reddit.com/r/apple/comments/d7ejpn/im_giving_away_an_iphone_11_pro_to_a_commenter_at/",
"report_reasons": null,
"link_author": "iamthatis",
"subreddit": "apple",
"author_flair_text": null,
"link_url": "https://www.reddit.com/r/apple/comments/d7ejpn/im_giving_away_an_iphone_11_pro_to_a_commenter_at/",
"created": 1569130696.0,
"collapsed": false,
"awarders": [],
"controversiality": 0,
"locked": false,
"author_flair_background_color": null,
"collapsed_because_crowd_control": null,
"rte_mode": "markdown",
"mod_reports": [],
"quarantine": false,
"subreddit_type": "public",
"ups": 1
}
}
],
"after": "t1_f0zsa37",
"before": null
}
}
+29
View File
@@ -0,0 +1,29 @@
{
"t2_1": {
"comment_karma": 22223,
"created_utc": 1489284107,
"link_karma": 488,
"name": "test_user_1",
"profile_color": "",
"profile_img": "https://www.redditstatic.com/avatars/avatar_default_01_94E044.png",
"profile_over_18": false
},
"t2_2": {
"comment_karma": 131948,
"created_utc": 1450635171,
"link_karma": 8277,
"name": "test_user_2",
"profile_color": "",
"profile_img": "https://www.redditstatic.com/avatars/avatar_default_16_25B79F.png",
"profile_over_18": false
},
"t2_3": {
"comment_karma": 81918,
"created_utc": 1362411991,
"link_karma": 126887,
"name": "test_user_3",
"profile_color": "",
"profile_img": "https://www.redditstatic.com/avatars/avatar_default_18_46A508.png",
"profile_over_18": true
}
}
+61
View File
@@ -0,0 +1,61 @@
{
"kind": "t2",
"data": {
"is_employee": false,
"icon_img": "https://www.redditstatic.com/avatars/avatar_default_16_25B79F.png",
"pref_show_snoovatar": false,
"name": "Test_User",
"is_friend": false,
"created": 1350583871.0,
"has_subscribed": true,
"hide_from_robots": false,
"created_utc": 1350555071.0,
"link_karma": 8239,
"comment_karma": 130514,
"is_gold": false,
"is_mod": true,
"verified": true,
"subreddit": {
"default_set": true,
"user_is_contributor": false,
"banner_img": "",
"restrict_posting": true,
"user_is_banned": false,
"free_form_reports": true,
"community_icon": null,
"show_media": true,
"icon_color": "#25B79F",
"user_is_muted": false,
"display_name": "u_Test_User",
"header_img": null,
"title": "",
"previous_names": [],
"over_18": false,
"icon_size": [256, 256],
"primary_color": "",
"icon_img": "https://www.redditstatic.com/avatars/avatar_default_16_25B79F.png",
"description": "",
"submit_link_label": "",
"header_size": null,
"restrict_commenting": false,
"subscribers": 0,
"submit_text_label": "",
"is_default_icon": true,
"link_flair_position": "",
"display_name_prefixed": "u/Test_User",
"key_color": "",
"name": "t5_test",
"is_default_banner": true,
"url": "/user/Test_User/",
"banner_size": null,
"user_is_moderator": false,
"public_description": "",
"link_flair_enabled": false,
"disable_contributor_requests": false,
"subreddit_type": "user",
"user_is_subscriber": false
},
"has_verified_email": true,
"id": "test"
}
}
+200
View File
@@ -0,0 +1,200 @@
{
"kind": "Listing",
"data": {
"modhash": null,
"dist": 2,
"children": [
{
"kind": "t3",
"data": {
"approved_at_utc": null,
"subreddit": "redditdev",
"selftext": "Talking about [this](https://www.reddit.com/dev/api/#GET_user_{username}_{where}) endpoint specifically.\n\nI'm building a Reddit API client, but don't have gold.",
"author_fullname": "t2_164ab8",
"saved": false,
"mod_reason_title": null,
"gilded": 0,
"clicked": false,
"title": "GET /user/{username}/gilded: does it return other user's things you've gilded, or your things that have been gilded? Does it return both comments and posts?",
"link_flair_richtext": [],
"subreddit_name_prefixed": "r/redditdev",
"hidden": false,
"pwls": 6,
"link_flair_css_class": "",
"downs": 0,
"thumbnail_height": null,
"top_awarded_type": null,
"hide_score": false,
"name": "t3_gczwql",
"quarantine": false,
"link_flair_text_color": "dark",
"upvote_ratio": 0.86,
"author_flair_background_color": null,
"subreddit_type": "public",
"ups": 9,
"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": "Reddit API",
"can_mod_post": false,
"score": 9,
"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": 1588574785.0,
"link_flair_type": "text",
"wls": 6,
"removed_by_category": null,
"banned_by": null,
"author_flair_type": "text",
"domain": "self.redditdev",
"allow_live_comments": false,
"selftext_html": "&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;Talking about &lt;a href=\"https://www.reddit.com/dev/api/#GET_user_%7Busername%7D_%7Bwhere%7D\"&gt;this&lt;/a&gt; endpoint specifically.&lt;/p&gt;\n\n&lt;p&gt;I&amp;#39;m building a Reddit API client, but don&amp;#39;t have gold.&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
"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,
"link_flair_template_id": "c4edd5ce-40e8-11e7-b814-0ef91bd65558",
"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_2qizd",
"mod_reason_by": null,
"removal_reason": null,
"link_flair_background_color": "",
"id": "gczwql",
"is_robot_indexable": true,
"report_reasons": null,
"author": "v_95",
"discussion_type": null,
"num_comments": 2,
"send_replies": true,
"whitelist_status": "all_ads",
"contest_mode": false,
"mod_reports": [],
"author_patreon_flair": false,
"author_flair_text_color": null,
"permalink": "/r/redditdev/comments/gczwql/get_userusernamegilded_does_it_return_other_users/",
"parent_whitelist_status": "all_ads",
"stickied": false,
"url": "https://www.reddit.com/r/redditdev/comments/gczwql/get_userusernamegilded_does_it_return_other_users/",
"subreddit_subscribers": 37829,
"created_utc": 1588545985.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_d7ejpn",
"author_flair_template_id": null,
"likes": true,
"replies": "",
"user_reports": [],
"saved": false,
"id": "f0zsa37",
"banned_at_utc": null,
"mod_reason_title": null,
"gilded": 0,
"archived": true,
"no_follow": false,
"author": "v_95",
"num_comments": 89751,
"can_mod_post": false,
"created_utc": 1569101896.0,
"send_replies": true,
"parent_id": "t3_d7ejpn",
"score": 1,
"author_fullname": "t2_164ab8",
"over_18": false,
"treatment_tags": [],
"approved_by": null,
"mod_note": null,
"all_awardings": [],
"subreddit_id": "t5_2qh1f",
"body": "Thank you!",
"link_title": "I'm giving away an iPhone 11 Pro to a commenter at random to celebrate Apollo for Reddit's new iOS 13 update and as a thank you to the community! Just leave a comment on this post and the winner will be selected randomly and announced tomorrow at 8 PM GMT. Details inside, and good luck!",
"author_flair_css_class": null,
"name": "t1_f0zsa37",
"author_patreon_flair": false,
"downs": 0,
"author_flair_richtext": [],
"is_submitter": false,
"body_html": "&lt;div class=\"md\"&gt;&lt;p&gt;Thank you!&lt;/p&gt;\n&lt;/div&gt;",
"gildings": {},
"collapsed_reason": null,
"distinguished": null,
"associated_award": null,
"stickied": false,
"author_premium": false,
"can_gild": false,
"top_awarded_type": null,
"subreddit_name_prefixed": "r/apple",
"author_flair_text_color": null,
"score_hidden": false,
"permalink": "/r/apple/comments/d7ejpn/im_giving_away_an_iphone_11_pro_to_a_commenter_at/f0zsa37/",
"num_reports": null,
"link_permalink": "https://www.reddit.com/r/apple/comments/d7ejpn/im_giving_away_an_iphone_11_pro_to_a_commenter_at/",
"report_reasons": null,
"link_author": "iamthatis",
"subreddit": "apple",
"author_flair_text": null,
"link_url": "https://www.reddit.com/r/apple/comments/d7ejpn/im_giving_away_an_iphone_11_pro_to_a_commenter_at/",
"created": 1569130696.0,
"collapsed": false,
"awarders": [],
"controversiality": 0,
"locked": false,
"author_flair_background_color": null,
"collapsed_because_crowd_control": null,
"rte_mode": "markdown",
"mod_reports": [],
"quarantine": false,
"subreddit_type": "public",
"ups": 1
}
}
],
"after": "t1_f0zsa37",
"before": null
}
}
+122
View File
@@ -0,0 +1,122 @@
{
"kind": "Listing",
"data": {
"modhash": null,
"dist": 1,
"children": [
{
"kind": "t3",
"data": {
"approved_at_utc": null,
"subreddit": "redditdev",
"selftext": "Talking about [this](https://www.reddit.com/dev/api/#GET_user_{username}_{where}) endpoint specifically.\n\nI'm building a Reddit API client, but don't have gold.",
"author_fullname": "t2_164ab8",
"saved": false,
"mod_reason_title": null,
"gilded": 0,
"clicked": false,
"title": "GET /user/{username}/gilded: does it return other user's things you've gilded, or your things that have been gilded? Does it return both comments and posts?",
"link_flair_richtext": [],
"subreddit_name_prefixed": "r/redditdev",
"hidden": false,
"pwls": 6,
"link_flair_css_class": "",
"downs": 0,
"thumbnail_height": null,
"top_awarded_type": null,
"hide_score": false,
"name": "t3_gczwql",
"quarantine": false,
"link_flair_text_color": "dark",
"upvote_ratio": 0.86,
"author_flair_background_color": null,
"subreddit_type": "public",
"ups": 9,
"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": "Reddit API",
"can_mod_post": false,
"score": 9,
"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": 1588574785.0,
"link_flair_type": "text",
"wls": 6,
"removed_by_category": null,
"banned_by": null,
"author_flair_type": "text",
"domain": "self.redditdev",
"allow_live_comments": false,
"selftext_html": "&lt;!-- SC_OFF --&gt;&lt;div class=\"md\"&gt;&lt;p&gt;Talking about &lt;a href=\"https://www.reddit.com/dev/api/#GET_user_%7Busername%7D_%7Bwhere%7D\"&gt;this&lt;/a&gt; endpoint specifically.&lt;/p&gt;\n\n&lt;p&gt;I&amp;#39;m building a Reddit API client, but don&amp;#39;t have gold.&lt;/p&gt;\n&lt;/div&gt;&lt;!-- SC_ON --&gt;",
"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,
"link_flair_template_id": "c4edd5ce-40e8-11e7-b814-0ef91bd65558",
"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_2qizd",
"mod_reason_by": null,
"removal_reason": null,
"link_flair_background_color": "",
"id": "gczwql",
"is_robot_indexable": true,
"report_reasons": null,
"author": "v_95",
"discussion_type": null,
"num_comments": 2,
"send_replies": true,
"whitelist_status": "all_ads",
"contest_mode": false,
"mod_reports": [],
"author_patreon_flair": false,
"author_flair_text_color": null,
"permalink": "/r/redditdev/comments/gczwql/get_userusernamegilded_does_it_return_other_users/",
"parent_whitelist_status": "all_ads",
"stickied": false,
"url": "https://www.reddit.com/r/redditdev/comments/gczwql/get_userusernamegilded_does_it_return_other_users/",
"subreddit_subscribers": 37829,
"created_utc": 1588545985.0,
"num_crossposts": 0,
"media": null,
"is_video": false
}
}
],
"after": "t3_gczwql",
"before": null
}
}