Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • hive/tests_api
1 result
Show changes
Showing
with 12997 additions and 0 deletions
---
test_name: Hivemind tags_api.get_comment_discussions_by_payout patterns test author permlink
marks:
- patterntest # differences in pending payout make it incomparable with original (also order of comments with the same payout was basically random)
# does not work correctly, start_author and start_permlink does not matter
includes:
- !include ../../common.yaml
stages:
- name: get_comment_discussions_by_payout
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "tags_api.get_comment_discussions_by_payout"
params: ["otc", "hi-steemit-let-me-take-a-picture", "10", "photography", 0]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "author_permlink"
directory: "tags_api_patterns/get_comment_discussions_by_payout"
\ No newline at end of file
---
test_name: Hivemind tags_api.get_comment_discussions_by_payout patterns test category
marks:
- patterntest # differences in pending payout make it incomparable with original (also order of comments with the same payout was basically random)
includes:
- !include ../../common.yaml
stages:
- name: get_comment_discussions_by_payout
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "tags_api.get_comment_discussions_by_payout"
params: ["", "", "10", "photography", 0]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "category"
directory: "tags_api_patterns/get_comment_discussions_by_payout"
\ No newline at end of file
[
{
"active_votes": [],
"author": "twitterbot",
"author_reputation": 0,
"beneficiaries": [],
"body": "### ![irqed](https://pbs.twimg.com/profile_images/664342080185995264/UFj_2Ipg_normal.jpg) **[##########](https://twitter.com/@irqed/status/358212928404586498)** tweeted @ 19 Jul 2013 - 13:13 UTC\n\n> 99 little bugs in the code\n99 little bugs in the code\nTake one down, patch it around\n117 little bugs in the code\n\n\n###### *Disclaimer: I am just a bot trying to be helpful.*",
"body_length": 371,
"cashout_time": "2016-10-01T23:28:15",
"category": "thisisgoingintomyinternetfolder",
"children": 0,
"created": "2016-08-31T03:58:33",
"curator_payout_value": "0.000 HBD",
"depth": 1,
"json_metadata": "{}",
"last_payout": "1969-12-31T23:59:59",
"last_update": "2016-08-31T03:58:33",
"max_accepted_payout": "1000000.000 HBD",
"net_rshares": 0,
"parent_author": "nemo",
"parent_permlink": "thisisgoingintomyinternetfolder",
"pending_payout_value": "0.000 HBD",
"percent_steem_dollars": 10000,
"permlink": "re-thisisgoingintomyinternetfolder-20160831t035832",
"post_id": 808802,
"promoted": "0.000 HBD",
"replies": [],
"root_title": "#thisisgoingintomyinternetfolder",
"title": "",
"total_payout_value": "0.000 HBD",
"url": "/thisisgoingintomyinternetfolder/@nemo/thisisgoingintomyinternetfolder#@twitterbot/re-thisisgoingintomyinternetfolder-20160831t035832"
}
]
[
{
"active_votes": [],
"author": "twitterbot",
"author_reputation": 0,
"beneficiaries": [],
"body": "### ![irqed](https://pbs.twimg.com/profile_images/664342080185995264/UFj_2Ipg_normal.jpg) **[##########](https://twitter.com/@irqed/status/358212928404586498)** tweeted @ 19 Jul 2013 - 13:13 UTC\n\n> 99 little bugs in the code\n99 little bugs in the code\nTake one down, patch it around\n117 little bugs in the code\n\n\n###### *Disclaimer: I am just a bot trying to be helpful.*",
"body_length": 371,
"cashout_time": "2016-09-07T03:58:33",
"category": "thisisgoingintomyinternetfolder",
"children": 0,
"created": "2016-08-31T03:58:33",
"curator_payout_value": "0.000 HBD",
"depth": 1,
"json_metadata": "",
"last_payout": "1969-12-31T23:59:59",
"last_update": "2016-08-31T03:58:33",
"max_accepted_payout": "1000000.000 HBD",
"net_rshares": 0,
"parent_author": "nemo",
"parent_permlink": "thisisgoingintomyinternetfolder",
"pending_payout_value": "0.000 HBD",
"percent_hbd": 10000,
"permlink": "re-thisisgoingintomyinternetfolder-20160831t035832",
"post_id": 1066025,
"promoted": "0.000 HBD",
"replies": [],
"root_title": "#thisisgoingintomyinternetfolder",
"title": "",
"total_payout_value": "0.000 HBD",
"url": "/thisisgoingintomyinternetfolder/@nemo/thisisgoingintomyinternetfolder#@twitterbot/re-thisisgoingintomyinternetfolder-20160831t035832"
}
]
---
test_name: Hivemind tags_api.get_comment_discussions_by_payout patterns test limit too long category
marks:
- patterntest
# category is too long > 24
includes:
- !include ../../common.yaml
stages:
- name: get_comment_discussions_by_payout
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "tags_api.get_comment_discussions_by_payout"
params: ["", "", "10", "thisisgoingintomyinternetfolder", 0]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "long_category"
directory: "tags_api_patterns/get_comment_discussions_by_payout"
\ No newline at end of file
---
test_name: Hivemind tags_api.get_comment_discussions_by_payout patterns test no data
marks:
- patterntest # differences in pending payout make it incomparable with original (also order of comments with the same payout was basically random)
includes:
- !include ../../common.yaml
stages:
- name: get_comment_discussions_by_payout
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "tags_api.get_comment_discussions_by_payout" # returns comments by pending_payout
params: [] # start_author: str = '', start_permlink: str = '',limit: int = 20. tag: str = None, truncate_body: int = 0
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "no_data"
directory: "tags_api_patterns/get_comment_discussions_by_payout"
\ No newline at end of file
---
test_name: Hivemind tags_api.get_comment_discussions_by_payout patterns test limit category with no votes (no payout)
marks:
- patterntest
# if all posts in category do not have any votes there is empty result
includes:
- !include ../../common.yaml
stages:
- name: get_comment_discussions_by_payout
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "tags_api.get_comment_discussions_by_payout"
params: ["", "", "1", "taylorswift", 0]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "no_votes"
directory: "tags_api_patterns/get_comment_discussions_by_payout"
\ No newline at end of file
[
{
"active_votes": [],
"author": "earnest",
"author_reputation": 0,
"beneficiaries": [],
"body": "dont get me started",
"body_length": 19,
"cashout_time": "2016-10-13T20:51:21",
"category": "432hz",
"children": 0,
"created": "2016-09-13T09:11:00",
"curator_payout_value": "0.000 HBD",
"depth": 1,
"json_metadata": "{\"tags\":[\"432hz\"]}",
"last_payout": "1969-12-31T23:59:59",
"last_update": "2016-09-13T09:11:00",
"max_accepted_payout": "1000000.000 HBD",
"net_rshares": 0,
"parent_author": "so-guitarist",
"parent_permlink": "any-musicians-know-about-the-a-440-or-a-432-phenomenon-2016913t1511946z",
"pending_payout_value": "0.000 HBD",
"percent_steem_dollars": 10000,
"permlink": "re-so-guitarist-any-musicians-know-about-the-a-440-or-a-432-phenomenon-2016913t1511946z-20160913t091058200z",
"post_id": 938655,
"promoted": "0.000 HBD",
"replies": [],
"root_title": "Any musicians know about the A = 440 or A = 432 Phenomenon?",
"title": "",
"total_payout_value": "0.000 HBD",
"url": "/432hz/@so-guitarist/any-musicians-know-about-the-a-440-or-a-432-phenomenon-2016913t1511946z#@earnest/re-so-guitarist-any-musicians-know-about-the-a-440-or-a-432-phenomenon-2016913t1511946z-20160913t091058200z"
},
{
"active_votes": [],
"author": "earnest",
"author_reputation": 0,
"beneficiaries": [],
"body": "i know",
"body_length": 6,
"cashout_time": "2016-10-13T20:51:21",
"category": "432hz",
"children": 0,
"created": "2016-09-13T08:53:36",
"curator_payout_value": "0.000 HBD",
"depth": 1,
"json_metadata": "{\"tags\":[\"432hz\"]}",
"last_payout": "1969-12-31T23:59:59",
"last_update": "2016-09-13T08:53:36",
"max_accepted_payout": "1000000.000 HBD",
"net_rshares": 0,
"parent_author": "so-guitarist",
"parent_permlink": "any-musicians-know-about-the-a-440-or-a-432-phenomenon-2016913t1511946z",
"pending_payout_value": "0.000 HBD",
"percent_steem_dollars": 10000,
"permlink": "re-so-guitarist-any-musicians-know-about-the-a-440-or-a-432-phenomenon-2016913t1511946z-20160913t085335400z",
"post_id": 938559,
"promoted": "0.000 HBD",
"replies": [],
"root_title": "Any musicians know about the A = 440 or A = 432 Phenomenon?",
"title": "",
"total_payout_value": "0.000 HBD",
"url": "/432hz/@so-guitarist/any-musicians-know-about-the-a-440-or-a-432-phenomenon-2016913t1511946z#@earnest/re-so-guitarist-any-musicians-know-about-the-a-440-or-a-432-phenomenon-2016913t1511946z-20160913t085335400z"
}
]
---
test_name: Hivemind tags_api.get_comment_discussions_by_payout patterns test limit not allowed category
marks:
- patterntest
# category name not allowed (starts with number)
# wrong output - comments with no payout
includes:
- !include ../../common.yaml
stages:
- name: get_comment_discussions_by_payout
request:
url: "{service.proto:s}://{service.server:s}:{service.port}/"
method: POST
headers:
content-type: application/json
json:
jsonrpc: "2.0"
id: 1
method: "tags_api.get_comment_discussions_by_payout"
params: ["", "", "10", "432hz", 0]
response:
status_code: 200
verify_response_with:
function: validate_response:compare_response_with_pattern
extra_kwargs:
method: "not_allowed_category"
directory: "tags_api_patterns/get_comment_discussions_by_payout"
\ No newline at end of file