Commit ec910438 authored by Marcin's avatar Marcin

add tests for bridge.get_ranked_posts paging

parent b23b1518
[
{
"active_votes": [
{
"rshares": 231809639013,
"voter": "anonymous"
},
{
"rshares": 40042046720125,
"voter": "blocktrades"
},
{
"rshares": 4287714457313,
"voter": "riverhead"
},
{
"rshares": 34979300821,
"voter": "altoz"
},
{
"rshares": 2733708608,
"voter": "steem1653"
},
{
"rshares": 251366150295,
"voter": "nabilov"
},
{
"rshares": 3813478158,
"voter": "btcupload"
},
{
"rshares": 1557779220,
"voter": "future24"
},
{
"rshares": 84942400,
"voter": "pompe72"
},
{
"rshares": 8773949381,
"voter": "craigwilliamz"
},
{
"rshares": 271440423,
"voter": "anomaly"
},
{
"rshares": 4249431309,
"voter": "michelle.gent"
},
{
"rshares": 1871969417,
"voter": "bapparabi"
},
{
"rshares": 2497059333,
"voter": "irensche"
},
{
"rshares": 84821361,
"voter": "katharsisdrill"
},
{
"rshares": 767043998,
"voter": "alienbutt"
}
],
"author": "alienbutt",
"author_payout_value": "0.000 HBD",
"author_reputation": 25.0,
"beneficiaries": [],
"blacklists": [],
"body": "You decide what they are.\nAlien heads staked on a post or seed pods?\n<a href=\"http://s346.photobucket.com/user/Glenn_Scrimshaw/media/DSCN2947_zpsx86w0mif.jpg.html\" target=\"_blank\"><img src=\"http://i346.photobucket.com/albums/p432/Glenn_Scrimshaw/DSCN2947_zpsx86w0mif.jpg\" border=\"0\" alt=\" photo DSCN2947_zpsx86w0mif.jpg\"/></a>\n\n<a href=\"http://s346.photobucket.com/user/Glenn_Scrimshaw/media/DSCN2944_zps2kijcdvn.jpg.html\" target=\"_blank\"><img src=\"http://i346.photobucket.com/albums/p432/Glenn_Scrimshaw/DSCN2944_zps2kijcdvn.jpg\" border=\"0\" alt=\" photo DSCN2944_zps2kijcdvn.jpg\"/></a>",
"category": "photography",
"children": 4,
"created": "2016-09-15T17:53:36",
"curator_payout_value": "0.000 HBD",
"depth": 0,
"is_paidout": false,
"json_metadata": {
"image": [
"http://i346.photobucket.com/albums/p432/Glenn_Scrimshaw/DSCN2947_zpsx86w0mif.jpg",
"http://i346.photobucket.com/albums/p432/Glenn_Scrimshaw/DSCN2944_zps2kijcdvn.jpg"
],
"links": [
"http://s346.photobucket.com/user/Glenn_Scrimshaw/media/DSCN2947_zpsx86w0mif.jpg.html",
"http://s346.photobucket.com/user/Glenn_Scrimshaw/media/DSCN2944_zps2kijcdvn.jpg.html"
],
"tags": [
"photography",
"art",
""
]
},
"max_accepted_payout": "1000000.000 HBD",
"net_rshares": 44874621891175,
"payout": 120.09,
"payout_at": "2016-09-22T17:53:36",
"pending_payout_value": "120.090 HBD",
"percent_hbd": 10000,
"permlink": "alien-or-plant",
"post_id": 1256752,
"promoted": "0.000 HBD",
"replies": [],
"stats": {
"flag_weight": 0.0,
"gray": false,
"hide": false,
"total_votes": 16
},
"title": "Alien or plant?",
"updated": "2016-09-15T18:23:18",
"url": "/photography/@alienbutt/alien-or-plant"
},
{
"active_votes": [
{
"rshares": 10699986834,
"voter": "shla-rafia"
},
{
"rshares": 3506039536,
"voter": "simon.braki.love"
}
],
"author": "shla-rafia",
"author_payout_value": "0.000 HBD",
"author_reputation": 25.0,
"beneficiaries": [],
"blacklists": [],
"body": "http://tinyimg.io/i/n2EAXoC.jpg\n\nToday started excellent. My travel friends and I inhaled and the day was golden. \n\nI hitchhiked to the center and created flyers over a nice Super Pollem joint.\n\nhttp://tinyimg.io/i/ps2kPG7.jpg\nhttp://tinyimg.io/i/vR0b1QA.jpg\n\nI promoted to:\n\n- Google Foto Employee from L.A. \n- Bodybuilder\n- Artist with atelier in the city-center\n- A coffeeshop employee\n- The man who took me into town\n- Travellers\n- Homeless people\n- Tourists from Virginia\n- And many more\n\n7 hours of hardcore promo for a better tomorrow.\n\nhttp://tinyimg.io/i/bPQeOiK.jpg\nhttp://tinyimg.io/i/xnXlrol.jpg\nhttp://tinyimg.io/i/X3F0zEa.jpg\n\nThe people react very good to the SteemFest news. In no time many people here will know about it.\n\nI am 16 hours a day active now. Thanks for reading and cheers,\n\nMarty",
"category": "steemfest",
"children": 0,
"created": "2016-09-15T17:52:18",
"curator_payout_value": "0.000 HBD",
"depth": 0,
"is_paidout": false,
"json_metadata": {
"image": [
"http://tinyimg.io/i/n2EAXoC.jpg",
"http://tinyimg.io/i/ps2kPG7.jpg",
"http://tinyimg.io/i/bPQeOiK.jpg"
],
"tags": [
"steemfest",
"promo",
"steemit",
"marketing",
"amsterdam"
]
},
"max_accepted_payout": "1000000.000 HBD",
"net_rshares": 14206026370,
"payout": 0.003,
"payout_at": "2016-09-22T17:52:18",
"pending_payout_value": "0.003 HBD",
"percent_hbd": 10000,
"permlink": "flyer-promo-in-amsterdam-for-steemfest-and-steemit",
"post_id": 1256742,
"promoted": "0.200 HBD",
"replies": [],
"stats": {
"flag_weight": 0.0,
"gray": false,
"hide": false,
"total_votes": 2
},
"title": "Flyer-Promo in Amsterdam for SteemFest and Steemit",
"updated": "2016-09-15T17:52:18",
"url": "/steemfest/@shla-rafia/flyer-promo-in-amsterdam-for-steemfest-and-steemit"
}
]
---
test_name: Hivemind bridge_api.get_ranked_posts created_paging patterns test
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: bridge_api.get_ranked_posts created_paging patterns test
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_ranked_posts"
params: {"sort":"created", "start_author":"curie","start_permlink":"the-daily-curie-14th-sept-15th-sept-2016","limit":2}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "created_paging"
directory: "bridge_api_patterns/get_ranked_posts"
---
test_name: Hivemind bridge_api.get_ranked_posts hot paging patterns test
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: bridge_api.get_ranked_posts hot paging patterns test
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_ranked_posts"
params: {"sort":"hot","tag":"","limit":2, "start_author":"curie","start_permlink":"the-daily-curie-14th-sept-15th-sept-2016"}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "hot_paging"
directory: "bridge_api_patterns/get_ranked_posts"
[
{
"active_votes": [
{
"rshares": 29864685009305,
"voter": "berniesanders"
},
{
"rshares": 639212703934,
"voter": "justin"
},
{
"rshares": 4968734358586,
"voter": "nextgencrypto"
},
{
"rshares": 2467989338,
"voter": "boy"
},
{
"rshares": 2995315607,
"voter": "bue-witness"
},
{
"rshares": 567154894,
"voter": "bunny"
},
{
"rshares": 41754679519,
"voter": "bue"
},
{
"rshares": 1653762021,
"voter": "mini"
},
{
"rshares": 170612336,
"voter": "moon"
},
{
"rshares": 490800486,
"voter": "healthcare"
},
{
"rshares": 709305835,
"voter": "daniel.pan"
},
{
"rshares": 229997595,
"voter": "helen.tan"
},
{
"rshares": 147833075316,
"voter": "jamtaylor"
},
{
"rshares": 33749012863,
"voter": "condra"
},
{
"rshares": 8813120108,
"voter": "blinova"
},
{
"rshares": 177253189627,
"voter": "blueorgy"
},
{
"rshares": 7958656381,
"voter": "kristylynn"
},
{
"rshares": 250542489,
"voter": "nat4ka"
},
{
"rshares": 2869166387,
"voter": "dercoco"
},
{
"rshares": 403314436,
"voter": "theconnoisseur"
},
{
"rshares": 33194586794,
"voter": "thecurator"
}
],
"author": "blueorgy",
"author_payout_value": "0.000 HBD",
"author_reputation": 25.0,
"beneficiaries": [],
"blacklists": [],
"body": "**Amazing Entries** once again this weekend! The talent here on steemit just keeps on growing with each #SteemitPhotoChallenge and I feel it's 100% a direct result of this **trending topic**. So be proud of your work and if you didn't make it into the **Top 3** don't even think about giving up, the computation is tuff and @condra had a difficult time deciding I'm sure.\n\n<hr>\n\n**Honourable Mentions**\n\n @kristylynn I really enjoyed this photo! It reminded me of when I was a kid grabbing dandelions at every change and blowing them all over the place! My father absolutely hated this because they would end up growing all over his lawn. Great work with the depth and the color is very pleasing. Thank you for bring back some old memories.\n\n@minion I tried to capture a very similar shot during my little exploration last sunday morning. I of course failed to get such a crisp, captivating, and **Super Lush** photo if you can describ the vibrant green colors this way. Great job on capturing that moment right before the water droplet escapes the branch , not easy and patience is required. \n\n**Finalist**\n\n@bebecitosfotos This flower is epic! The clarity and brightness is spot on and even the viewed in post and at lower resolution it still comes off as perfectly in focus (always a very difficult thing to do while using Macro). The background is just muted enough to capture a actual backdrop while not taking away fro the foreground image. Excellent work.\n\n@dercoco What can I say about this one... how about **EYES**. I have always loved the reptile eye, Great Work.\n\n@mweich This is spot on! Being able to capture the pollen on the Bee's legs was a great feat I tell you that, while still keeping other expects and depths of the photo in great focus is even harder, very still hand you must have! The angle of the photo and the choice of background imagery defiantly gave this photo an edge when it came to being Macro. The background is often forgot when capturing with Macro even thought it plays such a big role, you seem to have a very good eye for it. And **Congratulations!** on taking First Place!\n\n<hr>\n\nAgain I can't say it enough great job everyone, keep it up!\nCan't wait for next weekend's challenge @jamtaylor make it a good one ;)\n\nBlue",
"category": "steemitphotochallenge",
"children": 0,
"created": "2016-08-15T16:39:03",
"curator_payout_value": "0.000 HBD",
"depth": 1,
"is_paidout": false,
"json_metadata": {
"tags": [
"steemitphotochallenge"
],
"users": [
"kristylynn",
"minion",
"bebecitosfotos",
"dercoco",
"mweich",
"jamtaylor"
]
},
"max_accepted_payout": "1000000.000 HBD",
"net_rshares": 35935996353857,
"parent_author": "jamtaylor",
"parent_permlink": "steemit-photo-challenge-4-winners-announcement-guest-judge-condra",
"payout": 215.092,
"payout_at": "2016-08-22T16:39:03",
"pending_payout_value": "215.092 HBD",
"percent_hbd": 10000,
"permlink": "re-jamtaylor-steemit-photo-challenge-4-winners-announcement-guest-judge-condra-20160815t163904911z",
"post_id": 819413,
"promoted": "0.000 HBD",
"replies": [],
"stats": {
"flag_weight": 0.0,
"gray": false,
"hide": false,
"total_votes": 21
},
"title": "RE: \ud83d\udcf7 Steemit Photo Challenge #4 \u2014 WINNERS ANNOUNCEMENT! Guest Judge: @condra",
"updated": "2016-08-15T16:52:30",
"url": "/steemitphotochallenge/@jamtaylor/steemit-photo-challenge-4-winners-announcement-guest-judge-condra#@blueorgy/re-jamtaylor-steemit-photo-challenge-4-winners-announcement-guest-judge-condra-20160815t163904911z"
},
{
"active_votes": [
{
"rshares": 29864685009305,
"voter": "berniesanders"
},
{
"rshares": 639212703934,
"voter": "justin"
},
{
"rshares": 4968734358586,
"voter": "nextgencrypto"
},
{
"rshares": 11700424464,
"voter": "by24seven"
},
{
"rshares": 18794778971,
"voter": "ozzy-vega"
},
{
"rshares": 106925555861,
"voter": "anyx"
},
{
"rshares": 278001908,
"voter": "mirrax"
},
{
"rshares": 17506904849,
"voter": "keithsmih"
},
{
"rshares": 20129459504,
"voter": "cheetah"
},
{
"rshares": 100129802,
"voter": "cheetah33"
},
{
"rshares": 403314436,
"voter": "theconnoisseur"
},
{
"rshares": 100111679,
"voter": "cheetah34"
},
{
"rshares": 33194586794,
"voter": "thecurator"
},
{
"rshares": 198033574,
"voter": "alorya"
},
{
"rshares": 360071237,
"voter": "seraph"
},
{
"rshares": 154615872,
"voter": "celestial"
}
],
"author": "cheetah",
"author_payout_value": "0.000 HBD",
"author_reputation": 25.0,
"beneficiaries": [],
"blacklists": [],
"body": "Hi! I am a content-detection robot. This post is to help manual curators; I have NOT flagged you.\nHere is similar content:\nhttp://www.youtube.com/watch?v=Jetfhhkg_YU",
"category": "blocktalk",
"children": 4,
"created": "2016-08-15T19:46:09",
"curator_payout_value": "0.000 HBD",
"depth": 1,
"is_paidout": false,
"json_metadata": {},
"max_accepted_payout": "1000000.000 HBD",
"net_rshares": 35682478060776,
"parent_author": "blocktalk",
"parent_permlink": "blocktalk-with-nexus-colin-cantrell-question-thread",
"payout": 212.371,
"payout_at": "2016-08-22T19:46:09",
"pending_payout_value": "212.371 HBD",
"percent_hbd": 10000,
"permlink": "re-blocktalk-with-nexus-colin-cantrell-question-thread-20160815t194601",
"post_id": 822331,
"promoted": "0.000 HBD",
"replies": [],
"stats": {
"flag_weight": 0.0,
"gray": false,
"hide": false,
"total_votes": 16
},
"title": "RE: #Blocktalk with Nexus' Colin Cantrell [Question Thread]",
"updated": "2016-08-15T19:46:09",
"url": "/blocktalk/@blocktalk/blocktalk-with-nexus-colin-cantrell-question-thread#@cheetah/re-blocktalk-with-nexus-colin-cantrell-question-thread-20160815t194601"
}
]
---
test_name: Hivemind bridge_api.get_ranked_posts payout_comments_paging patterns test
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: bridge_api.get_ranked_posts payout_comments_paging patterns test
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_ranked_posts"
params: {"sort":"payout_comments","tag":"","start_author":"condra","start_permlink":"re-jamtaylor-steemit-photo-challenge-4-winners-announcement-guest-judge-condra-20160815t142348222z","limit":2}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "payout_comments_paging"
directory: "bridge_api_patterns/get_ranked_posts"
---
test_name: Hivemind bridge_api.get_ranked_posts payout paging patterns test
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: bridge_api.get_ranked_posts payout paging patterns test
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_ranked_posts"
params: {"sort":"payout","tag":"","start_author":"fairytalelife","start_permlink":"how-to-draw-a-braid","limit":2}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "payout_paging"
directory: "bridge_api_patterns/get_ranked_posts"
[
{
"active_votes": [
{
"rshares": 250810345690,
"voter": "lukestokes"
}
],
"author": "anduweb",
"author_payout_value": "0.000 HBD",
"author_reputation": 25.0,
"beneficiaries": [],
"blacklists": [],
"body": "Luke, the man with the numbers :) I love the idea. Interesting stats to look at:\n* Highest promoted amount per post\n* Highest number of promoters per post\n* Highest non-author promoted amount\n\nThere may be others who have already though to do 15.001. I too started with 10.001 in mind and got to 13.63 to have a good front-ish seat :) but I think amounts will start being higher and higher as pressure builds to be on the *first page*.\n\n@berniesanders is the real MVP, have said it before and it's still valid. Nice ROI on your post! Classic bump and reward case. Exactly what Post Promotion has been built for.\nI'm more testing the thing now but thank you for the feedback! It's good to see that my *marketing* campaign is showing results!\n\nYeah, up one for @smooth and @jesta! #classy",
"category": "steemit",
"children": 0,
"created": "2016-08-30T11:09:45",
"curator_payout_value": "0.000 HBD",
"depth": 2,
"is_paidout": false,
"json_metadata": {
"tags": [
"classy",
"steemit"
],
"users": [
"berniesanders",
"smooth",
"jesta"
]
},
"max_accepted_payout": "1000000.000 HBD",
"net_rshares": 250810345690,
"parent_author": "lukestokes",
"parent_permlink": "re-anduweb-steemit-post-promotion-and-the-dollar-auction-20160830t104200474z",
"payout": 0.117,
"payout_at": "2016-09-06T11:09:45",
"pending_payout_value": "0.117 HBD",
"percent_hbd": 10000,
"permlink": "re-lukestokes-re-anduweb-steemit-post-promotion-and-the-dollar-auction-20160830t110944376z",
"post_id": 1054616,
"promoted": "0.001 HBD",
"replies": [],
"stats": {
"flag_weight": 0.0,
"gray": false,
"hide": false,
"total_votes": 1
},
"title": "RE: Steemit Post Promotion and the Dollar Auction",
"updated": "2016-08-30T11:09:45",
"url": "/steemit/@anduweb/steemit-post-promotion-and-the-dollar-auction#@anduweb/re-lukestokes-re-anduweb-steemit-post-promotion-and-the-dollar-auction-20160830t110944376z"
}
]
---
test_name: Hivemind bridge_api.get_ranked_posts promoted paging patterns test
marks:
- patterntest
includes:
- !include ../../common.yaml
stages:
- name: bridge_api.get_ranked_posts promoted paging patterns test
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "bridge.get_ranked_posts"
params: {"sort":"promoted","tag":"","start_author":"zein","start_permlink":"re-jesta-re-bmann-re-jesta-update-on-the-steempress-theme-bounty-20160829t093247333z", "limit":2}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "promoted_paging"
directory: "bridge_api_patterns/get_ranked_posts"
<
---
test_name: Hivemind bridge_api.get_ranked_posts trading paging patterns test
marks:
- patterntest
includes:
- !include ../../common.yaml