Commit 6d3d0993 authored by Mariusz's avatar Mariusz Committed by Mariusz

Added tests: `find_votes`, `list_votes` ordered by comment_voter/voter_comment

parent b586718d
This diff is collapsed.
This diff is collapsed.
{
"votes": [
{
"author": "roelandp",
"id": 3341240,
"last_update": "2016-08-25T21:14:06",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "1443077144144",
"vote_percent": 10000,
"voter": "anonymous",
"weight": "14340640191507060"
},
{
"author": "roelandp",
"id": 3341540,
"last_update": "2016-08-25T21:20:09",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "158985837190",
"vote_percent": 10000,
"voter": "highasfuck",
"weight": "18707262932859690"
},
{
"author": "roelandp",
"id": 3346057,
"last_update": "2016-08-25T22:53:06",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "7872457033211",
"vote_percent": 10000,
"voter": "pharesim",
"weight": "575498905301694100"
},
{
"author": "roelandp",
"id": 3341406,
"last_update": "2016-08-25T21:17:21",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "1754932215280",
"vote_percent": 10000,
"voter": "hr1",
"weight": "240710957476907253"
},
{
"author": "roelandp",
"id": 3342421,
"last_update": "2016-08-25T21:37:36",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "9910147284570",
"vote_percent": 5000,
"voter": "tombstone",
"weight": "1299387373405102838"
},
{
"author": "roelandp",
"id": 3342412,
"last_update": "2016-08-25T21:37:18",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "2921333226039",
"vote_percent": 10000,
"voter": "wang",
"weight": "731336847763362836"
},
{
"author": "roelandp",
"id": 3346108,
"last_update": "2016-08-25T22:54:00",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": 2476131997,
"vote_percent": 10000,
"voter": "boy",
"weight": "140990083519884"
},
{
"author": "roelandp",
"id": 3346098,
"last_update": "2016-08-25T22:53:51",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": 3005703855,
"vote_percent": 10000,
"voter": "bue-witness",
"weight": "171594258591508"
},
{
"author": "roelandp",
"id": 3346112,
"last_update": "2016-08-25T22:54:03",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": 557354442,
"vote_percent": 10000,
"voter": "bunny",
"weight": "31731545284403"
},
{
"author": "roelandp",
"id": 3379387,
"last_update": "2016-08-26T15:42:12",
"num_changes": -1,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "2152215026140",
"vote_percent": 2900,
"voter": "complexring",
"weight": "109163904259652527"
}
]
}
[
{
"author": "roelandp",
"last_update": "2016-08-25T21:14:06",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "1443077144144",
"vote_percent": 10000,
"voter": "anonymous",
"weight": "14340640191507060"
},
{
"author": "roelandp",
"last_update": "2016-08-25T21:20:09",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "158985837190",
"vote_percent": 10000,
"voter": "highasfuck",
"weight": "18707262932859690"
},
{
"author": "roelandp",
"last_update": "2016-08-25T22:53:06",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "7872457033211",
"vote_percent": 10000,
"voter": "pharesim",
"weight": "575498905301694100"
},
{
"author": "roelandp",
"last_update": "2016-08-25T21:17:21",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "1754932215280",
"vote_percent": 10000,
"voter": "hr1",
"weight": "240710957476907253"
},
{
"author": "roelandp",
"last_update": "2016-08-25T21:37:36",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "9910147284570",
"vote_percent": 5000,
"voter": "tombstone",
"weight": "1299387373405102838"
},
{
"author": "roelandp",
"last_update": "2016-08-25T21:37:18",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "2921333226039",
"vote_percent": 10000,
"voter": "wang",
"weight": "731336847763362836"
},
{
"author": "roelandp",
"last_update": "2016-08-25T22:54:00",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": 2476131997,
"vote_percent": 10000,
"voter": "boy",
"weight": "140990083519884"
},
{
"author": "roelandp",
"last_update": "2016-08-25T22:53:51",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": 3005703855,
"vote_percent": 10000,
"voter": "bue-witness",
"weight": "171594258591508"
},
{
"author": "roelandp",
"last_update": "2016-08-25T22:54:03",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": 557354442,
"vote_percent": 10000,
"voter": "bunny",
"weight": "31731545284403"
},
{
"author": "roelandp",
"last_update": "2016-08-26T15:42:12",
"num_changes": 0,
"permlink": "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours",
"rshares": "2152215026140",
"vote_percent": 2900,
"voter": "complexring",
"weight": "109163904259652527"
}
]
{
"votes": [
{
"author": "steemit",
"id": 9,
"last_update": "2016-04-07T19:15:36",
"num_changes": -1,
"permlink": "firstpost",
"rshares": 375241,
"vote_percent": 100,
"voter": "dantheman",
"weight": "32866333630"
},
{
"author": "admin",
"id": 73,
"last_update": "2016-04-08T20:09:33",
"num_changes": -1,
"permlink": "firstpost",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "proskynneo",
"id": 10,
"last_update": "2016-04-07T19:55:42",
"num_changes": -1,
"permlink": "steemit-firstpost-1",
"rshares": 375241,
"vote_percent": 100,
"voter": "dantheman",
"weight": "7884736843"
},
{
"author": "red",
"id": 278,
"last_update": "2016-04-15T18:24:48",
"num_changes": -1,
"permlink": "steemit-firstpost-2",
"rshares": -376603,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "red",
"id": 8,
"last_update": "2016-04-07T19:15:24",
"num_changes": -1,
"permlink": "red-dailydecrypt-1",
"rshares": 375241,
"vote_percent": 100,
"voter": "dantheman",
"weight": "33132337607"
},
{
"author": "abit",
"id": 67,
"last_update": "2016-04-08T19:13:21",
"num_changes": -1,
"permlink": "abit-first-post",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "abit",
"id": 279,
"last_update": "2016-04-15T18:25:33",
"num_changes": -1,
"permlink": "witness-category",
"rshares": -376603,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "abit",
"id": 71,
"last_update": "2016-04-08T19:14:27",
"num_changes": -1,
"permlink": "miner-category",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "abit",
"id": 70,
"last_update": "2016-04-08T19:14:00",
"num_changes": -1,
"permlink": "spam",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "abit",
"id": 72,
"last_update": "2016-04-08T19:14:33",
"num_changes": -1,
"permlink": "abit-spam-post1",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
}
]
}
[
{
"author": "steemit",
"last_update": "2016-04-07T19:15:36",
"num_changes": 0,
"permlink": "firstpost",
"rshares": 375241,
"vote_percent": 100,
"voter": "dantheman",
"weight": "32866333630"
},
{
"author": "admin",
"last_update": "2016-04-08T20:09:33",
"num_changes": 0,
"permlink": "firstpost",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "proskynneo",
"last_update": "2016-04-07T19:55:42",
"num_changes": 0,
"permlink": "steemit-firstpost-1",
"rshares": 375241,
"vote_percent": 100,
"voter": "dantheman",
"weight": "7884736843"
},
{
"author": "red",
"last_update": "2016-04-15T18:24:48",
"num_changes": 0,
"permlink": "steemit-firstpost-2",
"rshares": -376603,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "red",
"last_update": "2016-04-07T19:15:24",
"num_changes": 0,
"permlink": "red-dailydecrypt-1",
"rshares": 375241,
"vote_percent": 100,
"voter": "dantheman",
"weight": "33132337607"
},
{
"author": "abit",
"last_update": "2016-04-08T19:13:21",
"num_changes": 0,
"permlink": "abit-first-post",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "abit",
"last_update": "2016-04-15T18:25:33",
"num_changes": 0,
"permlink": "witness-category",
"rshares": -376603,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "abit",
"last_update": "2016-04-08T19:14:27",
"num_changes": 0,
"permlink": "miner-category",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "abit",
"last_update": "2016-04-08T19:14:00",
"num_changes": 0,
"permlink": "spam",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
},
{
"author": "abit",
"last_update": "2016-04-08T19:14:33",
"num_changes": 0,
"permlink": "abit-spam-post1",
"rshares": -375241,
"vote_percent": -100,
"voter": "dantheman",
"weight": 0
}
]
......@@ -805,4 +805,105 @@ stages:
method: "list_comments_day_out_of_range_start_3"
directory: "database_api_patterns"
error_response: true
ignore_tags: ["timestamp"]
\ No newline at end of file
ignore_tags: ["timestamp"]
---
test_name: Hivemind database_api.list_votes patterns test order "by_voter_comment"
marks:
- patterntest # show last comments in base
includes:
- !include common.yaml
stages:
- name: list_votes_by_voter_comment
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.list_votes"
params:
{
"start":["nxt2", "roelandp", "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours"],
"limit": 10,
"order": "by_voter_comment",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "list_votes_by_voter_comment"
directory: "database_api_patterns"
---
test_name: Hivemind database_api.list_votes patterns test order "by_comment_voter"
marks:
- patterntest # show last comments in base
includes:
- !include common.yaml
stages:
- name: list_votes_by_comment_voter
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.list_votes"
params:
{
"start":["roelandp", "tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours", "nxt2"],
"limit": 10,
"order": "by_comment_voter",
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "list_votes_by_comment_voter"
directory: "database_api_patterns"
test_name: Hivemind database_api.find_votes patterns test
marks:
- patterntest
includes:
- !include common.yaml
stages:
- name: find_votes
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "database_api.find_votes"
params:
{
"author":"roelandp",
"permlink":"tldr-an-exploration-in-steem-botting-what-i-learned-since-it-s-inception-and-downfall-over-the-course-of-20-hours"
}
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "find_votes"
directory: "database_api_patterns"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment